MCPcopy Create free account

hub / github.com/bradfitz/exp-httpclient / functions

Functions54 in github.com/bradfitz/exp-httpclient

↓ 4 callersFunctionNewRequest
NewRequest returns a new request to the provided URL using the provided HTTP method.
httpclient/httpclient.go:75
↓ 1 callersMethodBody
Body sets the body for the request. If the Body also implements io.Closer, it is closed at the end of a request. If the body implements io.Seeker (su
httpclient/httpclient.go:94
↓ 1 callersMethodSetHeader
SetHeader sets the header k to the value v, overwriting any previous values. NOTE: see package comment about builder pattern.
httpclient/httpclient.go:124
↓ 1 callersFunctioncheck
(err error)
httpclient/example_test.go:22
MethodAddHeader
AddHeader appends the value v to the header k. NOTE: see package comment about builder pattern.
httpclient/httpclient.go:140
MethodAddTrailer
AddTrailer appends the value v to the trailer k. NOTE: see package comment about builder pattern.
httpclient/httpclient.go:148
MethodBody
()
httpclient/httpclient.go:293
MethodClose
Close immediately closes the underlying connection, even if it's still in use. To shut it down as soon as gracefully possible, ... TODO.
httpclient/httpclient.go:247
MethodCode
Code returns the numeric HTTP status code.
http/status.go:27
MethodConnection
()
httpclient/httpclient.go:290
MethodContainsToken
(key, token string)
httpclient/httpclient.go:230
FunctionDefaultPool
= TODO
httpclient/httpclient.go:203
MethodDo
Do executes the HTTP request and returns the response. On error, the the error will be one of: -
httpclient/httpclient.go:268
FunctionExample
()
httpclient/example_test.go:14
FunctionFetch
(genType interface{})
httpclient/httpclient.go:44
MethodFormValues
FormValues sets the Request's Content-Type to "application/x-www-form-urlencoded" and encodes the provided data values as its body. NOTE: see package
httpclient/httpclient.go:106
MethodGet
(key string)
httpclient/httpclient.go:228
MethodGetMultiple
(key string)
httpclient/httpclient.go:229
MethodHeader
()
httpclient/httpclient.go:292
MethodIsClientError
IsClientError reports whether s is in the Client Error (4xx) status code class, as defined by RFC 7231 section 6.5.
http/status.go:69
MethodIsNotModified
IsNotModified reports whether s is the 304 Not Modified status.
http/status.go:80
MethodIsServerError
IsServerError reports whether s is in the Server Error (5xx) status code class, as defined by RFC 7231 section 6.6.
http/status.go:75
MethodIsSuccess
IsSuccess reports whether s is in the Successful (2xx) status code class, as defined by RFC 7231 section 6.3.
http/status.go:63
MethodIsTLS
()
http/proto.go:23
FunctionJSONUnmarshal
JSONMarshal returns a response Handler that unmarshals the JSON response into dst.
httpclient/httpclient.go:273
MethodJar
Jar ... NOTE: see package comment about builder pattern.
httpclient/httpclient.go:188
MethodLimitBytes
LimitBytes limits the response bytes. By default, LimitBytes is bounded to a reasonable upper bound (currently 128 MiB), unless overridden by a Handl
httpclient/httpclient.go:160
MethodMajor
()
http/proto.go:15
MethodMinor
()
http/proto.go:19
FunctionNewGet
NewGet returns a new GET request to the provided URL.
httpclient/httpclient.go:59
FunctionNewHead
NewHead returns a new HEAD request to the provided URL. A Head response never contains a body, so any attempt to read its body is an error.
httpclient/httpclient.go:65
FunctionNewPost
NewPost returns a new POST request to the provided URL.
httpclient/httpclient.go:68
FunctionNewPut
NewPut returns a new PUT request to the provided URL.
httpclient/httpclient.go:71
FunctionNewStatus
(code int, text string)
http/status.go:22
MethodPermitsResponseBody
PermitsResponseBody reports whether the status code s permits having a response body.
http/status.go:59
MethodPool
Pool sets the connection pool to use with this connection. As a special case, the nil pool disables connection reuse. NOTE: see package comment ab
httpclient/httpclient.go:214
MethodProtocol
Protocol returns the protocol being used to talk to the server.
httpclient/httpclient.go:241
MethodReadHTTP
(HandlerState)
httpclient/httpclient.go:302
MethodReadHTTP
(s HandlerState)
httpclient/httpclient.go:308
MethodRedirectPolicy
RedirectPolicy ... By default, N redirects are followed. TODO: specifies cookies. As a special case, the nil redirect policy disables all redirects
httpclient/httpclient.go:180
MethodRequestBodyAllowed
()
http/method.go:26
MethodRequestBodyCommon
()
http/method.go:30
MethodResponseBodyAllowed
()
http/method.go:34
MethodRestartableBody
RestartableBody is like Body, but sets a func which returns the Body as needed. The function may be called 0, 1, or multiple times.
httpclient/httpclient.go:116
MethodSetTrailer
SetTrailer sets the trailer k to the value v, overwriting any previous values. NOTE: see package comment about builder pattern.
httpclient/httpclient.go:132
MethodStatus
()
httpclient/httpclient.go:291
MethodString
String returns a combination of the Code and Text in the form of "200 OK".
http/status.go:53
MethodText
Text returns the textual description of the status code. For HTTP/1.x responses, this is exactly what the server sent in the "reason-phrase" of the "
http/status.go:44
MethodTimeout
Timeout sets the timeout for the entire request, including any redirects and reading the response body. If the context expires first, the request sti
httpclient/httpclient.go:258
MethodTrailer
()
httpclient/httpclient.go:294
MethodValid
Valid reports whether the status is in a known range (1xx to 5xx).
http/status.go:30
MethodisRequestOpt
()
httpclient/httpclient.go:38
Methodunexported
unexported method so we can extend this interface over time without breaking people. Implementers must embed a concrete type from elsewhere.
httpclient/httpclient.go:198
Methodunexported
()
httpclient/httpclient.go:296