mbr/elm-again/1.0.1

Again.Http

Helpers for HTTP tasks and retry decisions.

isRetryable : Error -> Bool

Accepts timeouts, network errors, and status codes 408, 429, 500, 502, 503, and 504. Other errors are rejected.

Assumes the operation is safe to repeat: a timeout does not mean a write failed. Does not account for Retry-After, since Http.Error does not retain headers.

resolve : Response body -> Result Error body

Keep the body of a successful response, or turn a failed response into an Http.Error. Use with Http.stringResolver or Http.bytesResolver.