Package utils provides a set of reusable HTTP client utilities used internally in gentleman for required functionality and testing.
NopCloser returns a ReadCloser with a no-op Close
method wrapping the provided Reader r.
ReplyWithStatus helper to write the http.Response status code and text.
StringReader creates an io.ReadCloser interface from a string.
WriteBodyString writes a string based body in a given http.Response.
XMLCharDecoder is a helper type that takes a stream of bytes (not encoded in UTF-8) and returns a reader that encodes the bytes into UTF-8. This is done because Go's XML library only supports XML encoded in UTF-8.