Generates HTTP request for XML API. Can be used with elm-lang/http.
Using ymtszw/elm-xml-decode for decoding XML response into Elm values.
import Http
import Http.Xml
import Xml.Decode exposing (single, string)
type Msg = XmlMsg (Result Http.Error String)
getXmlReq : Http.Request String
getXmlReq =
Http.Xml.request "GET" [] "https://example.com/xml" Http.emptyBody (single string)
getXml : Cmd Msg
getXml =
Http.send XmlMsg getXmlReqBSD-3-Clause