Documentation
¶
Index ¶
Constants ¶
View Source
const ( ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" CRIDLength = 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryResponse ¶
BinaryResponse represents a non json content which cannot be inspected by gotojs like an image or other content.
func NewBinaryResponse ¶
func NewBinaryResponse(res *http.Response) (ret *BinaryResponse)
NewBinaryResponse returns a new binary response object for a http response.
func (*BinaryResponse) Catch ¶
func (b *BinaryResponse) Catch() (ret []byte, err error)
func (*BinaryResponse) Close ¶
func (b *BinaryResponse) Close() error
func (*BinaryResponse) MimeType ¶
func (b *BinaryResponse) MimeType() string
type Client ¶
type Client struct { Client *http.Client Header http.Header // contains filtered or unexported fields }
func NewProxyClient ¶
func NewProxyClient(c *http.Client, jar http.CookieJar, bu *url.URL, ph string, crid string) (ret *Client)
NewProxyClient creates a new gotojs client that can be used to proxy incoming requests to a remote gotojs instance from within a local gotojs instance.
func (*Client) CopyHeader ¶
CopyHeader copies incoming request header to the outgoing proxy call. Some headers are excluded like the cookie header.
Click to show internal directories.
Click to hide internal directories.