{"id":15059713,"url":"https://github.com/ymtszw/elm-http-xml","last_synced_at":"2026-01-02T12:05:18.659Z","repository":{"id":62419679,"uuid":"113345328","full_name":"ymtszw/elm-http-xml","owner":"ymtszw","description":"Generates HTTP request for XML API","archived":false,"fork":false,"pushed_at":"2019-08-15T11:41:50.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-14T18:22:48.633Z","etag":null,"topics":["elm","elm-lang","http","xml"],"latest_commit_sha":null,"homepage":"http://package.elm-lang.org/packages/ymtszw/elm-http-xml/latest","language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ymtszw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-06T17:13:13.000Z","updated_at":"2019-08-15T11:41:52.000Z","dependencies_parsed_at":"2022-11-01T17:00:35.045Z","dependency_job_id":null,"html_url":"https://github.com/ymtszw/elm-http-xml","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymtszw%2Felm-http-xml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymtszw%2Felm-http-xml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymtszw%2Felm-http-xml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymtszw%2Felm-http-xml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ymtszw","download_url":"https://codeload.github.com/ymtszw/elm-http-xml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681083,"owners_count":20330155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elm","elm-lang","http","xml"],"created_at":"2024-09-24T22:46:58.357Z","updated_at":"2026-01-02T12:05:18.610Z","avatar_url":"https://github.com/ymtszw.png","language":"Elm","readme":"# elm-http-xml\n\nGenerates HTTP request for XML API. Can be used with [`elm/http`][http].\n\nUsing [`ymtszw/elm-xml-decode`][exd] for decoding XML response into Elm values.\n\n[http]: http://package.elm-lang.org/packages/elm/http/latest\n[exd]: http://package.elm-lang.org/packages/ymtszw/elm-xml-decode/latest\n\n## Basic Example\n\n```elm\nimport Http\nimport Http.Xml\nimport Xml.Decode exposing (..)\n\ntype alias Data =\n    { string : String\n    , integers : List Int\n    }\n\ntype Msg = XmlApiResponse (Result Http.Error Data)\n\ngetXml : Cmd Msg\ngetXml =\n    Http.get\n        { url = \"https://example.com/data.xml\"\n        , expect = Http.Xml.expectXml XmlApiResponse dataDecoder\n        }\n\ndataDecoder : Decoder Data\ndataDecoder =\n    map2 Data\n        (path [ \"path\", \"to\", \"string\" ] (single string))\n        (path [ \"path\", \"to\", \"int\", \"list\" ] (list int))\n\n-- Use with customization\ntrickyGetXml : Cmd Msg\ntrickyGetXml =\n    Http.riskyRequest\n        { method = \"GET\"\n        , headers = [ Http.header \"Accept\" \"application/xml\" ]\n        , url = \"https://example.com/data.xml\"\n        , body = Http.emptyBody\n        , expect = Http.Xml.expectXml XmlApiResponse dataDecoder\n        , timeout = Nothing\n        , tracker = Nothing\n        }\n\n```\n\n## Upgrade from 1.x to 2.x\n\n- It now supports `elm/http@2.x`, which drops `Http.Request` data type. As a result, there is no interface to nicely add `Accept: application/xml` header.\n  **You have to add the header** if your target servers rigorously require them.\n  - Probably the most reasonable interface which should take `Accept` header values are `Http.Expect`.\n  - See this issue: https://github.com/elm/http/issues/54\n\n## License\n\nBSD-3-Clause\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymtszw%2Felm-http-xml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fymtszw%2Felm-http-xml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymtszw%2Felm-http-xml/lists"}