go get github.com/nbio/lye
Minimal precursor for SOAP. Extracted from and used in production at domainr.com.
- Because XML.
- “It’s only after we’ve lost everything that we’re free to do anything.” — Tyler Durden
req := struct {
XMLName xml.Name `xml:"https://example.com/soapnamespace Command"`
Question string `xml:"Nested>Question"`
}{
Question: "Who am I?",
}
x, err := lye.NewRequest(req).Marshal()
if err != nil {
return err
}
res, err := http.Post("https://api.example.com/", lye.ContentType, bytes.NewBuffer(x))
if err != nil {
return err
}
- Tests
- Examples
- Responses?
© 2015 nb.io, LLC