Open o-az opened 2 weeks ago
This is by design.
ofetch.raw
is not the equivalent of native fetch (you can access it using ofetch.native
). It only gives you the whole response
object after the request has been completed, instead of only the data
(.json()
/ .text()
return value). I believe you could set the responseType
parameter to 'stream'
and it may skip awaiting data, see source. However, if you do so, you'll be responsible for parsing the response (eg. r.text()
) yourself.
Also see: https://github.com/unjs/ofetch/issues/45
Describe the change
I'm trying to track the response progress, something which I do all the time when using the native Fetch API. However I'm encountering unexpected behavior with ofetch:
testing server:
URLs
No response
Additional information