Skip to content

Commit 90d2c70

Browse files
release: 9.12.1 (#663)
* fix(client): send content-type header for requests with an omitted optional body * release: 9.12.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent cb0520e commit 90d2c70

8 files changed

Lines changed: 23 additions & 7 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "9.12.0"
2+
".": "9.12.1"
33
}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 9.12.1 (2026-06-16)
4+
5+
Full Changelog: [v9.12.0...v9.12.1](https://github.com/Finch-API/finch-api-node/compare/v9.12.0...v9.12.1)
6+
7+
### Bug Fixes
8+
9+
* **client:** send content-type header for requests with an omitted optional body ([94c0b7f](https://github.com/Finch-API/finch-api-node/commit/94c0b7f440454ae4eff4a12dae821142f9c6e728))
10+
311
## 9.12.0 (2026-06-09)
412

513
Full Changelog: [v9.11.2...v9.12.0](https://github.com/Finch-API/finch-api-node/compare/v9.11.2...v9.12.0)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tryfinch/finch-api",
3-
"version": "9.12.0",
3+
"version": "9.12.1",
44
"description": "The official TypeScript library for the Finch API",
55
"author": "Finch <founders@tryfinch.com>",
66
"types": "dist/index.d.ts",

packages/mcp-server/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"dxt_version": "0.2",
33
"name": "@tryfinch/finch-api-mcp",
4-
"version": "9.12.0",
4+
"version": "9.12.1",
55
"description": "The official MCP Server for the Finch API",
66
"author": {
77
"name": "Finch",

packages/mcp-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tryfinch/finch-api-mcp",
3-
"version": "9.12.0",
3+
"version": "9.12.1",
44
"description": "The official MCP Server for the Finch API",
55
"author": "Finch <founders@tryfinch.com>",
66
"types": "dist/index.d.ts",

packages/mcp-server/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const newMcpServer = async ({
2929
new McpServer(
3030
{
3131
name: 'tryfinch_finch_api_api',
32-
version: '9.12.0',
32+
version: '9.12.1',
3333
},
3434
{
3535
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),

src/client.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,11 +816,19 @@ export class Finch {
816816
return () => controller.abort();
817817
}
818818

819-
private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
819+
private buildBody({ options }: { options: FinalRequestOptions }): {
820820
bodyHeaders: HeadersLike;
821821
body: BodyInit | undefined;
822822
} {
823+
const { body, headers: rawHeaders } = options;
823824
if (!body) {
825+
// A resource method always passes a `body` key when its operation defines a
826+
// request body, even if the caller omitted an optional body param. Keep the
827+
// content-type for those, and only elide it for operations with no body at
828+
// all (e.g. GET/DELETE).
829+
if (body == null && 'body' in options) {
830+
return this.#encoder({ body, headers: buildHeaders([rawHeaders]) });
831+
}
824832
return { bodyHeaders: undefined, body: undefined };
825833
}
826834
const headers = buildHeaders([rawHeaders]);

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '9.12.0'; // x-release-please-version
1+
export const VERSION = '9.12.1'; // x-release-please-version

0 commit comments

Comments
 (0)