Documentation
¶
Index ¶
Constants ¶
View Source
const ( TplBoundary = `===========%s==` HdrContentID = `Content-Id` HdrContentLength = `Content-Length` HdrContentType = `Content-Type` HdrContentTransferEncoding = `Content-Transfer-Encoding` HdrMimeVersion = `Mime-Version` HdrUseHTTPS = `X-Use-Https` MimeHTTP = `application/http` MimeHTTPv = `application/http;version=1.1` MimeJSON = `application/json` MimeBatch = `multipart/batch` MimeType = `type` MimeBoundary = `boundary` SchemeHTTP = `http` SchemeHTTPS = `https` TrEncBinary = `binary` )
Variables ¶
This section is empty.
Functions ¶
func BatchHTTPError ¶
Types ¶
type Request ¶
func NewRequest ¶
func (*Request) Marshal ¶
Marshal renders the request body and sets the base HTTP request header Content-Length to the byte length of the rendered body.
type RequestBodyReader ¶
type RequestBodyReader struct { Boundary string Src io.ReadCloser }
type RequestBodyWriter ¶
type RequestBodyWriter struct {
// contains filtered or unexported fields
}
func NewRequestBodyWriter ¶
func NewRequestBodyWriter() *RequestBodyWriter
func (*RequestBodyWriter) ReadCloser ¶
func (rw *RequestBodyWriter) ReadCloser() io.ReadCloser
type Response ¶
func NewResponse ¶
NewResponse creates a new *Response with the slice of responses pre-allocated to the number of requests in req. The response ID is set from the Content-Id of the *Request.
type ResponseBodyReader ¶
type ResponseBodyReader struct { Boundary string Src io.ReadCloser }
type ResponseBodyWriter ¶
type ResponseBodyWriter struct {
// contains filtered or unexported fields
}
func NewResponseBodyWriter ¶
func NewResponseBodyWriter() *ResponseBodyWriter
func (*ResponseBodyWriter) ReadCloser ¶
func (rw *ResponseBodyWriter) ReadCloser() io.ReadCloser
Click to show internal directories.
Click to hide internal directories.