Skip to content

Releases: japa/api-client

Update dependencies

13 Dec 11:07

Choose a tag to compare

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

06 May 09:07

Choose a tag to compare

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

  • normalize header name in assertHeader & assertHeaderMissing (#15) (6fd8c08)

Features

  • add support for specifying a custom query string serializer (1dc2334), closes #13

What's Changed

  • fix: normalize header name in assertHeader & assertHeaderMissing by @Vahelnir in #15

New Contributors

Full Changelog: v3.0.4...v3.1.0

Accept case insensitive header name via response.header

18 Mar 16:54

Choose a tag to compare

3.0.4 (2025-03-18)

Bug Fixes

  • allow unstrict case for response header getter (#12) (4f43983)

What's Changed

  • fix: allow unstrict case for response header getter by @tpoisseau in #12

New Contributors

Full Changelog: v3.0.3...v3.0.4

Fix import of optional dependency

12 Jan 12:54

Choose a tag to compare

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

12 Jan 12:48

Choose a tag to compare

3.0.2 (2025-01-12)

Bug Fixes

Full Changelog: v3.0.1...v3.0.2

Fix peer dependency range for japa/assert

12 Jan 12:30

Choose a tag to compare

Do not throw error for status code >= 500

12 Jan 04:33

Choose a tag to compare

3.0.0 (2025-01-12)

BREAKING CHANGES

  • The ensureAssert method is no longer a public method.
  • HTTP responses with status code >=500 no longer throws an exception. Earlier they used to. If you want to print the exception response, you can use the response.dumpError method.

Code Refactoring

  • make ensureAssert private and rely on openapi-assertions package (c8e85c1)

Features

  • ✨ add response status assertions shortcuts (#6) (0cac856)
  • 500+ error handling (#9) (014fbca)

What's Changed

New Contributors

Full Changelog: v2.0.4...v3.0.0

Update dependencies

20 Nov 07:46
e9c2ec7

Choose a tag to compare

  • chore: update dependencies 49605a4

v2.0.3...v2.0.4

Full Changelog: v2.0.3...v2.0.4

Update dependencies

02 Apr 07:21

Choose a tag to compare

  • chore: update dependencies 15bd2db

Full Changelog: v2.0.2...v2.0.3

Update dependencies

16 Dec 09:20

Choose a tag to compare

  • chore: update dependencies 4f98204

Full Changelog: v2.0.1...v2.0.2