fix!: examine response content-type if no contentType is set#535
Conversation
|
|
||
| opts.validateStatus = opts.validateStatus || this.validateStatus; | ||
| opts.responseType = opts.responseType || 'json'; | ||
| opts.responseType = opts.responseType || 'unknown'; |
There was a problem hiding this comment.
I want to get some opinions on whether or not we would consider this a breaking change. Previously we defaulted for to JSON as the contentType if the caller did not specify one. This is sort of a faulty assumption and we probably should have been looking at the response headers. I changed this to default to unknown but I fear that consumers may have been relying on this old JSON behavior.
There was a problem hiding this comment.
I think this would technically be breaking, although customers would be relying on a bug.
There was a problem hiding this comment.
If we do this, we should also update the README: https://github.com/googleapis/gaxios#request-options
There was a problem hiding this comment.
Updated the README
|
Compodoc > 1.1.19 has a dependency on marked 5.0.2 which requires node 18 minimum. Pinning compodoc in this PR. |
|
Warning: This pull request is touching the following templated files:
|
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #226 🦕