You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 3, 2026. It is now read-only.
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 :)
Related to googleapis/google-api-nodejs-client#1777.
We accept a
responseTypeas part of the request config that dictates what processing we do with the response body before returning it inres.data. By default, we just assumejsonif not told otherwise. The problem pops up when the content type is defined in a response header, and we just ignore it. When anapplication/gzipcontent type comes back in a header, I'd argue we shouldn't tryJSON.parse-ing that by default :)