[{"name":"Request","comment":"\n\n@docs Request, HttpMethod, map\n\n\n## Config objects\n\n@docs Config, simple, simpleFromHttpResponse\n\n\n## Create requests\n\n@docs http, get, post, put, delete, patch, options, head\n\n\n## Create JSON requests\n\n@docs postJson, putJson, deleteJson, patchJson\n\n\n## Declare task content\n\n@docs Expect, expectJson, expectBytes, expectString, expectWhatever\n\n\n## Convert to commands and tasks\n\n@docs cmd, task\n\n\n## Declares the payload\n\n@docs withJsonBody, withStringBody, withEmptyBody, withBytesBody, withFileBody\n\n\n## Set request parameters\n\n@docs withBody, withHeaders, withQuery, withIntQuery\n\n\n## Advanced request parameters\n\n@docs excludeDefaultHeaders, ignoreDefaultHeaders, risky\n\n","unions":[{"name":"Expect","comment":" Represents the expected response in an Http request\n","args":["value"],"cases":[]},{"name":"HttpMethod","comment":" An enum that represent all valid HTTP methods.\n","args":[],"cases":[["GET",[]],["POST",[]],["PUT",[]],["DELETE",[]],["PATCH",[]],["OPTIONS",[]],["HEAD",[]]]},{"name":"Request","comment":" Represent an HTTP request\n","args":["url","value"],"cases":[]}],"aliases":[{"name":"Config","comment":" Config objects allow Requests that uses different URL representations\nthan Strings and different error types than Http.Error.\n","args":["url","error"],"type":"{ toUrl : url -> String.String, fromHttpResponse : Http.Response String.String -> error, timeout : Maybe.Maybe Basics.Float, risky : Basics.Bool, headers : List.List ( String.String, String.String ) }"}],"values":[{"name":"cmd","comment":" Convert a request to a command.\n\nThis function requires a config object. If you don not need one, use the `simple`\nconfig exported by this package.\n\n    Request.get\n        { url = \"https://example.com\"\n        , expect = Request.expectJson Json.Decode.string\n        }\n        |> Request.cmd Request.simple ResponseReceived\n\n","type":"Request.Config url error -> (Result.Result error value -> msg) -> Request.Request url value -> Platform.Cmd.Cmd msg"},{"name":"delete","comment":" Create a DELETE request.\n","type":"{ url : url, expect : Request.Expect a } -> Request.Request url a"},{"name":"deleteJson","comment":" Create a DELETE request with an optional JSON body and expecting a JSON response.\n","type":"{ url : url, decoder : Json.Decode.Decoder a, body : Maybe.Maybe Json.Decode.Value } -> Request.Request url a"},{"name":"excludeDefaultHeaders","comment":" Ignore specific default headers declared in the config.\n\n    Request.get\n        { url = \"https://example.com\"\n        , expect = Request.expectJson Json.Decode.string\n        }\n        |> Request.excludeDefaultHeaders [ \"Authorization\", \"Cookie\" ]\n\n","type":"List.List String.String -> Request.Request url a -> Request.Request url a"},{"name":"expectBytes","comment":" Declares a request that expects a binary response handled with the given decoder.\n","type":"Bytes.Decode.Decoder a -> Request.Expect a"},{"name":"expectJson","comment":" Declares a request that expects a JSON response handled with the given decoder.\n","type":"Json.Decode.Decoder a -> Request.Expect a"},{"name":"expectString","comment":" Declares a request that expects a simple string response.\n","type":"Request.Expect String.String"},{"name":"expectWhatever","comment":" Ignores the content of the received response.\n","type":"Request.Expect ()"},{"name":"get","comment":" Create a GET request.\n","type":"{ url : url, expect : Request.Expect a } -> Request.Request url a"},{"name":"head","comment":" Create a HEAD request.\n","type":"{ url : url, expect : Request.Expect a } -> Request.Request url a"},{"name":"http","comment":" Create a simple http request\n","type":"Request.HttpMethod -> { url : url, expect : Request.Expect a } -> Request.Request url a"},{"name":"ignoreDefaultHeaders","comment":" Ignore all default headers declared in the config.\n\n    Request.get\n        { url = \"https://example.com\"\n        , expect = Request.expectJson Json.Decode.string\n        }\n        |> Request.ignoreDefaultHeaders\n\n","type":"Request.Request url a -> Request.Request url a"},{"name":"map","comment":" Modify the expected return value for the effect\n","type":"(a -> b) -> Request.Request url a -> Request.Request url b"},{"name":"options","comment":" Create an OPTIONS request.\n","type":"{ url : url, expect : Request.Expect a } -> Request.Request url a"},{"name":"patch","comment":" Create a PATCH request.\n","type":"{ url : url, expect : Request.Expect a } -> Request.Request url a"},{"name":"patchJson","comment":" Create a PATCH request with a JSON body and expecting a JSON response.\n","type":"{ url : url, decoder : Json.Decode.Decoder a, body : Json.Decode.Value } -> Request.Request url a"},{"name":"post","comment":" Create a POST request.\n","type":"{ url : url, expect : Request.Expect a } -> Request.Request url a"},{"name":"postJson","comment":" A convenience function that creates a POST request with a JSON body and\nexpecting a JSON response.\n\n    Request.postJson\n        { url = \"https://example.com\"\n        , body = Json.Encode.object [ ( \"key\", Json.Encode.string \"value\" ) ]\n        , decoder = Json.Decode.string\n        }\n\n","type":"{ url : url, decoder : Json.Decode.Decoder a, body : Json.Decode.Value } -> Request.Request url a"},{"name":"put","comment":" Create a PUT request.\n","type":"{ url : url, expect : Request.Expect a } -> Request.Request url a"},{"name":"putJson","comment":" Create a PUT request with a JSON body and expecting a JSON response.\n","type":"{ url : url, decoder : Json.Decode.Decoder a, body : Json.Decode.Value } -> Request.Request url a"},{"name":"risky","comment":" Declares the request as risky (or not) according to the boolean argument.\n\n    Request.get\n        { url = \"https://example.com\"\n        , expect = Request.expectJson Json.Decode.string\n        }\n        |> Request.risky True\n\n","type":"Basics.Bool -> Request.Request url value -> Request.Request url value"},{"name":"simple","comment":" The default config\n","type":"Request.Config String.String Http.Error"},{"name":"simpleFromHttpResponse","comment":" Convert Http.Response to Http.Error\n\nSometimes it is easier to use this to create custom error types.\n\n","type":"Http.Response String.String -> Http.Error"},{"name":"task","comment":" Convert a request to a task.\n\nThis function requires a config object. If you don not need one, use the `simple`\nconfig exported by this package.\n\n    Request.get\n        { url = \"https://example.com\"\n        , expect = Request.expectJson Json.Decode.string\n        }\n        |> Request.task Request.simple\n\n","type":"Request.Config url error -> Request.Request url value -> Task.Task error value"},{"name":"withBody","comment":" Set the request body using some instance of Http.Body\n\n    Http.stringBody \"text/plain\" \"Some text\"\n\nRequests expose some helper functions, but for more complex cases, you should refer\nto the Http module.\n\n","type":"Http.Body -> Request.Request url a -> Request.Request url a"},{"name":"withBytesBody","comment":" Declares a Binary body with a given content type.\n","type":"String.String -> Bytes.Bytes -> Request.Request url a -> Request.Request url a"},{"name":"withEmptyBody","comment":" Set the request body to be empty.\n","type":"Request.Request url a -> Request.Request url a"},{"name":"withFileBody","comment":" Declares a File body with a given file and an optional identifier.\n\nThe name can be used to track the download progress of the file by subscribing\nto events created by `Http.tracker id onProgressMsg`.\n\n","type":"Maybe.Maybe String.String -> File.File -> Request.Request url a -> Request.Request url a"},{"name":"withHeaders","comment":" Adds a list of headers to the request.\n\n    Request.get\n        { url = \"https://example.com\"\n        , expect = Request.expectJson Json.Decode.string\n        }\n        |> Request.withHeaders [ ( \"Authorization\", \"Bearer \" ++ token ) ]\n\n","type":"List.List ( String.String, String.String ) -> Request.Request url a -> Request.Request url a"},{"name":"withIntQuery","comment":" Adds an integer query parameter to the final url\n\n    Request.get\n        { url = \"https://example.com\"\n        , expect = Request.expectJson Json.Decode.string\n        }\n        |> Request.withIntQuery \"default-answer\" 42\n\n","type":"String.String -> Basics.Int -> Request.Request url a -> Request.Request url a"},{"name":"withJsonBody","comment":" Declares a JSON body\n","type":"Json.Decode.Value -> Request.Request url a -> Request.Request url a"},{"name":"withQuery","comment":" Adds a query parameter to the final url\n\n    Request.get\n        { url = \"https://example.com\"\n        , expect = Request.expectJson Json.Decode.string\n        }\n        |> Request.withQuery \"search\" \"what is the answer to the question of life, the universe and everything?\"\n\n","type":"String.String -> String.String -> Request.Request url a -> Request.Request url a"},{"name":"withStringBody","comment":" Declares a string body by specifing the content type and the data.\n\n    Request.get\n        { url = \"https://example.com\"\n        , expect = Request.expectJson Json.Decode.string\n        }\n        |> Request.withStringBody \"text/plain\" \"Some text\"\n\n","type":"String.String -> String.String -> Request.Request url a -> Request.Request url a"}],"binops":[]}]