Versions in this module Expand all Collapse all v0 v0.1.1 Aug 9, 2020 v0.1.0 Aug 8, 2020 Changes in this version + func SetDebugOutput(w io.Writer) v0.0.11 Jun 18, 2020 v0.0.9 Jun 18, 2020 v0.0.8 Jun 18, 2020 v0.0.7 Jun 18, 2020 Changes in this version + var DEBUG = false + func SetDebugMode(debug bool) v0.0.5 Jun 17, 2020 v0.0.4 Jun 17, 2020 v0.0.3 Jun 17, 2020 v0.0.2 Jun 17, 2020 v0.0.1 May 30, 2020 Changes in this version + const AllowHeader + const CRLF + const DoubleCRLF + const EncapsulatedHeader + const ErrConnectionNotOpen + const ErrInvalidHost + const ErrInvalidScheme + const ErrInvalidTCPMsg + const ErrMethodNotRegistered + const ErrREQMODWithNoReq + const ErrREQMODWithResp + const ErrRESPMODWithNoResp + const HTTPVersion + const ICAPVersion + const ISTagHeader + const LF + const MaxConnectionsHeader + const MethodOPTIONS + const MethodREQMOD + const MethodRESPMOD + const MethodsHeader + const OptBodyTypeHeader + const OptionsTTLHeader + const PreviewHeader + const SchemeHTTPReq + const SchemeHTTPResp + const SchemeICAP + const ServiceHeader + const ServiceIDHeader + const TransferCompleteHeader + const TransferIgnoreHeader + const TransferPreviewHeader + func DumpRequest(req *Request) ([]byte, error) + type Client struct + Timeout time.Duration + func (c *Client) Do(req *Request) (*Response, error) + func (c *Client) DoRemaining(req *Request) (*Response, error) + func (c *Client) SetDriver(d *Driver) + type Driver struct + DialerTimeout time.Duration + Host string + Port int + ReadTimeout time.Duration + WriteTimeout time.Duration + func NewDriver(host string, port int) *Driver + func (d *Driver) Close() error + func (d *Driver) Connect() error + func (d *Driver) ConnectWithContext(ctx context.Context) error + func (d *Driver) Receive() (*Response, error) + func (d *Driver) Send(data []byte) error + type Request struct + ChunkLength int + HTTPRequest *http.Request + HTTPResponse *http.Response + Header http.Header + Method string + PreviewBytes int + URL *url.URL + func NewRequest(method, urlStr string, httpReq *http.Request, httpResp *http.Response) (*Request, error) + func (r *Request) ExtendHeader(hdr http.Header) error + func (r *Request) SetContext(ctx context.Context) + func (r *Request) SetDefaultRequestHeaders() + func (r *Request) SetPreview(maxBytes int) error + func (r *Request) Validate() error + type Response struct + ContentRequest *http.Request + ContentResponse *http.Response + Header http.Header + PreviewBytes int + Status string + StatusCode int + func ReadResponse(b *bufio.Reader) (*Response, error)