Skip to main content

Enumeration: FetchResultTypes

The supported return types for the fetch method

Enumeration Members

Enumeration MemberValueDescription

Returns only the body, as a Blob.


For NodeJS environment other FetchResultTypes are recommended, but you can use a Blob if you want to.


Returns only the body, as a Buffer.


Does not work in a Browser environment. For browsers use FetchResultTypes.Blob instead. If you use this type in a Browsers environment a ReferenceError ReferenceError: Buffer is not defined will be thrown!


Returns only the body, as JSON. Similar to Body.json().

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 unknown.
Result"result"Returns the entire response and doesn't parse the body in any way.
Text"text"Returns only the body, as plain text. Similar to Body.text().