Created
April 14, 2018 22:11
-
-
Save jamesplease/d00bcf8c870476473470329f80e389b2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// This is a complete representation of an HTTP request | |
{ | |
// Whether or not the request is finished. This means that no more | |
// data will be received. A request can be finished and errored, or | |
// finished and successful. | |
// Equal to: | |
// state === ' | |
finished: {Boolean}, | |
// Whether or not the request failed for any reason: network requests, | |
// aborted requests, status codes >= 400, and so on. | |
failed: {Boolean}, | |
// The request can only be in one of these states at a time. | |
state: {"requesting", "responding", "aborted", "errored", "complete"}, | |
// `null` while in a "requesting" state. | |
response: {null|Response}, | |
// If there is a network error, then this will be that error. | |
error: {null|Error} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment