Skip to content
This repository was archived by the owner on Jan 3, 2026. It is now read-only.
This repository was archived by the owner on Jan 3, 2026. It is now read-only.

Content-Type response header is ignored #226

@JustinBeckwith

Description

@JustinBeckwith

Related to googleapis/google-api-nodejs-client#1777.

We accept a responseType as part of the request config that dictates what processing we do with the response body before returning it in res.data. By default, we just assume json if not told otherwise. The problem pops up when the content type is defined in a response header, and we just ignore it. When an application/gzip content type comes back in a header, I'd argue we shouldn't try JSON.parse-ing that by default :)

Metadata

Metadata

Assignees

Labels

next major: breaking changethis is a change that we should wait to bundle into the next major versionpriority: p2Moderately-important priority. Fix may not be included in next release.semver: majorHint for users that this is an API breaking change.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions