diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 94994d4..2f16273 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.67.0" + ".": "0.67.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f50ab1..5a9ba83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.67.1 (2026-06-17) + +Full Changelog: [v0.67.0...v0.67.1](https://github.com/smithery-ai/typescript-api/compare/v0.67.0...v0.67.1) + +### Bug Fixes + +* **client:** send content-type header for requests with an omitted optional body ([50edf0a](https://github.com/smithery-ai/typescript-api/commit/50edf0ad77b4a1d2fce4757102521c009110a0d0)) + ## 0.67.0 (2026-05-30) Full Changelog: [v0.66.0...v0.67.0](https://github.com/smithery-ai/typescript-api/compare/v0.66.0...v0.67.0) diff --git a/package-lock.json b/package-lock.json index bcd9591..2556f78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@smithery/api", - "version": "0.67.0", + "version": "0.67.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@smithery/api", - "version": "0.67.0", + "version": "0.67.1", "license": "Apache-2.0", "devDependencies": { "@arethetypeswrong/cli": "^0.17.0", diff --git a/package.json b/package.json index 233fad5..4bb0603 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@smithery/api", - "version": "0.67.0", + "version": "0.67.1", "description": "The official TypeScript library for the Smithery API", "author": "Smithery ", "types": "dist/index.d.ts", diff --git a/src/client.ts b/src/client.ts index 289dbc9..4f3ddca 100644 --- a/src/client.ts +++ b/src/client.ts @@ -780,11 +780,19 @@ export class Smithery { 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 ed32717..08f9854 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.67.0'; // x-release-please-version +export const VERSION = '0.67.1'; // x-release-please-version