Closed alstn2468 closed 5 months ago
@sindresorhus I think I need to add a test code for Ky
instance, so it would be nice if you could give me your opinion on which one to add.
Oh I just remembered something, and I think this issuse might be a problem with hooks applied to instance. I'll check a little more and close the PR.
Fixed #556
[Example]
[Error Message]
Same as when use
JSON.parse('OK')
[Temporary solution]
[Description]
For
json
type, if there is no JSON type of response, an exception occurs when invoking theJSON.parse
function. Thetext
method ofResponse
has been modified to return a string as it is in the response. I think we can discuss which values we should return (whether we return empty strings like 204) I think it's an error to have a parsing error when the user didn't directly call thejson
method.2024.01.17 It was modified from using the try catch block to confirm the
accpet
of the request header. If the type isjson
and you can't parse it with JSON and you don't want to process it, I'd like your opinion.