Skip to content

Releases: payload-code/armrest-node

v0.2.2

11 Dec 01:30
v0.2.2
c10cb15

Choose a tag to compare

Release Notes

🚀 Features

Default Headers Support in Session (#6)

Added the ability to configure default headers at the Session level that will be automatically applied to all requests made within that session. This allows for cleaner code when working with APIs that require consistent headers across multiple requests.

What's New

  • Session instances now support a headers configuration option
  • Default headers are automatically merged with request-specific headers
  • Request-level headers take precedence over session defaults
  • Comprehensive test coverage for the new functionality

Usage Example

import Armrest from '@armrest/client'

const API = new Armrest('http://armrest-api-url')
  .model('Example')

const api = API.Session('api-key', {
  headers: {
    'X-Custom-Header': 'value',
    'User-Agent': 'MyApp/1.0'
  }
})

New Contributors

Full Changelog

v0.2.1...v0.2.2

v0.2.1

29 May 14:37
692130f

Choose a tag to compare

What's Changed

  • Bump follow-redirects from 1.15.5 to 1.15.6 by @dependabot in #5

New Contributors

Full Changelog: v0.2.0...v0.2.1

v0.2.0

11 Mar 21:44
c9eddcc

Choose a tag to compare

What's Changed

  • Fix typo in Model.all

Full Changelog: v0.1.8...v0.2.0

v0.1.8

04 Oct 18:22
04a2a2a

Choose a tag to compare

What's Changed

  • Fixed typo in Session.delete

Full Changelog: v0.1.7...v0.1.8

v0.1.7

07 Aug 21:42
056de35

Choose a tag to compare

What's Changed

  • Fix build process for hybrid esm and cjs module

Full Changelog: v0.1.4...v0.1.7

v0.1.3

07 Aug 13:01
7fe8a86

Choose a tag to compare

What's Changed

  • Add range()
  • Create build process for hybrid esm and cjs module
  • Fix create if no initial object is passed

New Contributors

Full Changelog: v0.1.1...v0.1.3

v0.1.1

24 May 13:55
1a0412d

Choose a tag to compare

Initial release of the Node.js Armrest client library