Releases: japa/api-client
Releases · japa/api-client
Update dependencies
3.1.1 (2025-12-13)
Full Changelog: v3.1.0...v3.1.1
Add support for specifying custom query string serializer and make header assertion case insensitive
Add support for specifying custom query string serializer and make header assertion case insensitive
The custom query string serializer could be used to specify how the query strings are serialized to a string before sending it in the request. For example:
import { stringify } from 'qs'
import { ApiRequest } from '@japa/api-client'
ApiRequest.setQsSerializer((value) => stringify(value))
test('send arrays in query string', ({ client }) => {
await client
.get('/')
.qs('ids', ['1']) // send as Array
.qs('usernames[]', 'virk') // send using array brackets in the key name
})3.1.0 (2025-05-06)
Bug Fixes
Features
What's Changed
New Contributors
Full Changelog: v3.0.4...v3.1.0
Accept case insensitive header name via response.header
3.0.4 (2025-03-18)
Bug Fixes
What's Changed
- fix: allow unstrict case for response header getter by @tpoisseau in #12
New Contributors
- @tpoisseau made their first contribution in #12
Full Changelog: v3.0.3...v3.0.4
Fix import of optional dependency
3.0.3 (2025-01-12)
Bug Fixes
- use reference directive to import optional dependency (2ee58e3)
Full Changelog: v3.0.2...v3.0.3
Fix - Add missing superagent dependency
Fix peer dependency range for japa/assert
3.0.1 (2025-01-12)
Full Changelog: v3.0.0...v3.0.1
Do not throw error for status code >= 500
3.0.0 (2025-01-12)
BREAKING CHANGES
- The ensureAssert method is no longer a public method.
- HTTP responses with status code
>=500no longer throws an exception. Earlier they used to. If you want to print the exception response, you can use theresponse.dumpErrormethod.
Code Refactoring
- make ensureAssert private and rely on openapi-assertions package (c8e85c1)
Features
What's Changed
- feat: add response status assertions shortcuts by @luffynando in #6
- feat: 500+ error handling by @tom-laplace in #9
New Contributors
- @luffynando made their first contribution in #6
- @tom-laplace made their first contribution in #9
Full Changelog: v2.0.4...v3.0.0
Update dependencies
Update dependencies
- chore: update dependencies 15bd2db
Full Changelog: v2.0.2...v2.0.3
Update dependencies
- chore: update dependencies 4f98204
Full Changelog: v2.0.1...v2.0.2