Last active
April 4, 2018 17:39
-
-
Save jamesplease/9c5bb2070b0beb457430835d120530ae to your computer and use it in GitHub Desktop.
Possible piece of an API for a fetch wrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// The response was received, and the data is currently streaming. | |
// Note: this can be `true` even when the request fails (if the body of | |
// the error is being streamed) | |
streaming: <Boolean>, | |
// The response has not yet been returned by the server, OR it has been | |
// returned and the headers are still streaming (it appears that the headers) | |
// are immediately available at the same time that the Response object is | |
// made available to you) | |
awaiting: <Boolean>, | |
// The response succeeded. Equal to (!error && res.ok) | |
succeeded: <Boolean>, | |
// The response failed for some reason. The opposite of `succeeded`. This | |
// includes network errors as well as error status codes. | |
// Equal to (error || !res.ok) | |
failed: <Boolean>, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment