/lye

Minimal precursor for SOAP

Primary LanguageGoMIT LicenseMIT

lye

go get github.com/nbio/lye

Minimal precursor for SOAP. Extracted from and used in production at domainr.com.

Why?

  1. Because XML.
  2. “It’s only after we’ve lost everything that we’re free to do anything.” — Tyler Durden

Usage

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
}

TODO

  • Tests
  • Examples
  • Responses?

Author

© 2015 nb.io, LLC