[{"name":"Ext.Http","comment":" This module extends the `Http` module with better error handling and more information in the success case.\n\n@docs Error, TaskInput, errorString, identityResolver, jsonResolver\n\n","unions":[{"name":"Error","comment":" Use Ext.Http.Error instead of Http.Error to get more information about the error.\n","args":["a"],"cases":[["BadUrl",["String.String"]],["Timeout",[]],["NetworkError",[]],["BadStatus",["Http.Metadata","a"]],["BadJson",["Http.Metadata","a","Json.Decode.Error"]]]}],"aliases":[{"name":"TaskInput","comment":" Named type alias for the `Http.task` parameter\n","args":["x","a"],"type":"{ method : String.String, headers : List.List Http.Header, url : String.String, body : Http.Body, resolver : Http.Resolver x a, timeout : Maybe.Maybe Basics.Float }"}],"values":[{"name":"errorString","comment":" Convenience function to convert an Ext.Http.Error to a String.\n","type":"Ext.Http.Error String.String -> String.String"},{"name":"identityResolver","comment":" A resolver that does process the response at all. It just returns the response as is, but with `Http.Metadata` included. And with error type as `Ext.Http.Error` instead of `Http.Error`.\n\nUseful for decoding non-json payloads like Bytes or String\n\n","type":"Http.Response a -> Result.Result (Ext.Http.Error a) { meta : Http.Metadata, data : a }"},{"name":"jsonResolver","comment":" Resolver for `Http.task` that includes proper details in both the error case and metadata in the success case.\n\nUsually metadata is not needed in the success case, just add `Task.map .data` to your existing code\n\n    ```diff\n     Http.task\n         { method = \"GET\"\n         , headers = []\n         , url = \"https://example.com\"\n         , body = Http.emptyBody\n    -    , resolver = Http.stringResolver (otherJsonResolver myDecoder)\n    +    , resolver = Http.stringResolver (Ext.Http.jsonResolver myDecoder)\n         , timeout = Nothing\n         }\n    +    |> Task.map .data\n    ```\n\nBut when you need it, having the metadata available is very useful.\n\n    ```diff\n     Http.task\n         { method = \"GET\"\n         , headers = []\n         , url = \"https://example.com\"\n         , body = Http.emptyBody\n         , resolver = Http.stringResolver (Ext.Http.jsonResolver myDecoder)\n         , timeout = Nothing\n         }\n    +    |> Task.map (Debug.log \"{ meta, data }\")\n         |> Task.map .data\n    ```\n\n","type":"Json.Decode.Decoder a -> Http.Response String.String -> Result.Result (Ext.Http.Error String.String) { meta : Http.Metadata, data : a }"}],"binops":[]}]