Documentation
¶
Overview ¶
Package proxyutil provides functionality for building proxies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetErrorRspBody ¶ added in v1.2.4
func GetRangeStart ¶
GetRangeStart returns the byte index of the start of the range, if it has one. Returns 0 if the range header is absent, and -1 if the range header is invalid or has multi-part ranges.
func NewResponse ¶
NewResponse builds new HTTP responses. If body is nil, an empty byte.Buffer will be provided to be consistent with the guarantees provided by http.Transport and http.Client.
Types ¶
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
Header is a generic representation of a set of HTTP headers for requests and responses.
func RequestHeader ¶
RequestHeader returns a new set of headers from a request.
func ResponseHeader ¶
ResponseHeader returns a new set of headers from a request.
func (*Header) Add ¶
Add appends the value to the existing header at name for the request or response.
func (*Header) All ¶
All returns all the values for header name. If the header does not exist it returns nil, false.