The supported return types for the
• Blob =
Returns only the body, as a
For NodeJS environment other
FetchResultTypes are recommended, but you can use a Blob if you want to.
• Buffer =
Returns only the body, as a Buffer.
Does not work in a Browser environment. For browsers use Blob instead.
If you use this type in a Browsers environment a ReferenceError
ReferenceError: Buffer is not defined will be thrown!
• JSON =
Returns only the body, as JSON. Similar to
You should provide your own type cast (either through the generic return type, or with
as <type>) to the response to define
the JSON structure, otherwise the result will be
• Result =
Returns the entire response and doesn't parse the
body in any way.
• Text =
Returns only the body, as plain text. Similar to