Skip to content

Instantly share code, notes, and snippets.

@jamesplease
Created April 14, 2018 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesplease/d00bcf8c870476473470329f80e389b2 to your computer and use it in GitHub Desktop.
Save jamesplease/d00bcf8c870476473470329f80e389b2 to your computer and use it in GitHub Desktop.
// 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