diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5fdd883..c4ddc74 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.1.0" + ".": "1.1.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d509d98..397ef6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.1.1 (2026-06-17) + +Full Changelog: [v1.1.0...v1.1.1](https://github.com/parallel-web/parallel-sdk-typescript/compare/v1.1.0...v1.1.1) + +### Bug Fixes + +* **client:** send content-type header for requests with an omitted optional body ([c6fe4a8](https://github.com/parallel-web/parallel-sdk-typescript/commit/c6fe4a83c994e6e669223ef4343462c614a32541)) + ## 1.1.0 (2026-06-08) Full Changelog: [v1.0.1...v1.1.0](https://github.com/parallel-web/parallel-sdk-typescript/compare/v1.0.1...v1.1.0) diff --git a/package.json b/package.json index 1a1e419..89c2a49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "parallel-web", - "version": "1.1.0", + "version": "1.1.1", "description": "The official TypeScript library for the Parallel API", "author": "Parallel ", "types": "dist/index.d.ts", diff --git a/src/client.ts b/src/client.ts index b216d9a..feaa40e 100644 --- a/src/client.ts +++ b/src/client.ts @@ -782,11 +782,19 @@ export class Parallel { return () => controller.abort(); } - private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): { + private buildBody({ options }: { options: FinalRequestOptions }): { bodyHeaders: HeadersLike; body: BodyInit | undefined; } { + const { body, headers: rawHeaders } = options; if (!body) { + // A resource method always passes a `body` key when its operation defines a + // request body, even if the caller omitted an optional body param. Keep the + // content-type for those, and only elide it for operations with no body at + // all (e.g. GET/DELETE). + if (body == null && 'body' in options) { + return this.#encoder({ body, headers: buildHeaders([rawHeaders]) }); + } return { bodyHeaders: undefined, body: undefined }; } const headers = buildHeaders([rawHeaders]); diff --git a/src/version.ts b/src/version.ts index c80f975..4d7aaa3 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '1.1.0'; // x-release-please-version +export const VERSION = '1.1.1'; // x-release-please-version