BuildFetchOptions
Index
Properties
optionalcoerce
Type declaration
Parameters
promise: Promise<Response>
Returns Promise<Response>
optionaldebug
Whether to enable debug mode. This is useful for debugging through the
middleware stack. The default value is true
buildFetch
will add a
$debug
property on the fetch
function that is returned with helpful
debug information.
optionaldisableMessage
What message to throw if a user tries to invoke a disabled fetch. Useful to help users know where to import fetch from rather than build it // themselves.
optionaldisablePrior
Whether to force earlier built fetches to error making the most recent // invokation the authoritive fetch. You will typically only want to set this to false for testing. Defaults to true.
optionalfetch
Type declaration
override the default fetch implementation
Parameters
input: RequestInfo | URL
optionalinit: RequestInit
Returns Promise<Response>
Gives consumers an opportunity to manipulate the Promise object before handing it over to downstream for further processing.
One use case is in Ember distribution whereas the fetch needs to return a RSVP.Promise instance instead of the native promise.