Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPParser ¶
type HTTPParser struct { Do func(req *http.Request) (*http.Response, error) // contains filtered or unexported fields }
HTTPParser struct initialiser must define CtxClient...
parser := &httpparser.HttpParser{ Client: httpClient, CtxClient: ctxhttp.Do, }
overriding ctxhttp package's Do call with "CtxClient" https://github.com/golang/net/blob/master/context/ctxhttp/ctxhttp.go#L23 Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) {
func NewHTTPParser ¶
func NewHTTPParser(client *http.Client, timeout time.Duration) *HTTPParser
NewHTTPParser initialise the client. If parameters are not given, it will initialise with the default values.
Click to show internal directories.
Click to hide internal directories.