Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.33.0"
".": "0.33.1"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.33.1 (2026-06-16)

Full Changelog: [v0.33.0...v0.33.1](https://github.com/perplexityai/perplexity-node/compare/v0.33.0...v0.33.1)

### Bug Fixes

* **client:** send content-type header for requests with an omitted optional body ([ea14be8](https://github.com/perplexityai/perplexity-node/commit/ea14be8cd8fa67316a4edd0d998ad6721246f029))

## 0.33.0 (2026-06-08)

Full Changelog: [v0.32.0...v0.33.0](https://github.com/perplexityai/perplexity-node/compare/v0.32.0...v0.33.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@perplexity-ai/perplexity_ai",
"version": "0.33.0",
"version": "0.33.1",
"description": "The official TypeScript library for the Perplexity API",
"author": "Perplexity <api@perplexity.ai>",
"types": "dist/index.d.ts",
Expand Down
10 changes: 9 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -697,11 +697,19 @@ export class Perplexity {
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]);
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.33.0'; // x-release-please-version
export const VERSION = '0.33.1'; // x-release-please-version