Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bradfitz/exp-httpclient
/ functions
Functions
54 in github.com/bradfitz/exp-httpclient
⨍
Functions
54
◇
Types & classes
17
↓ 4 callers
Function
NewRequest
NewRequest returns a new request to the provided URL using the provided HTTP method.
httpclient/httpclient.go:75
↓ 1 callers
Method
Body
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 callers
Method
SetHeader
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 callers
Function
check
(err error)
httpclient/example_test.go:22
Method
AddHeader
AddHeader appends the value v to the header k. NOTE: see package comment about builder pattern.
httpclient/httpclient.go:140
Method
AddTrailer
AddTrailer appends the value v to the trailer k. NOTE: see package comment about builder pattern.
httpclient/httpclient.go:148
Method
Body
()
httpclient/httpclient.go:293
Method
Close
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
Method
Code
Code returns the numeric HTTP status code.
http/status.go:27
Method
Connection
()
httpclient/httpclient.go:290
Method
ContainsToken
(key, token string)
httpclient/httpclient.go:230
Function
DefaultPool
= TODO
httpclient/httpclient.go:203
Method
Do
Do executes the HTTP request and returns the response. On error, the the error will be one of: -
httpclient/httpclient.go:268
Function
Example
()
httpclient/example_test.go:14
Function
Fetch
(genType interface{})
httpclient/httpclient.go:44
Method
FormValues
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
Method
Get
(key string)
httpclient/httpclient.go:228
Method
GetMultiple
(key string)
httpclient/httpclient.go:229
Method
Header
()
httpclient/httpclient.go:292
Method
IsClientError
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
Method
IsNotModified
IsNotModified reports whether s is the 304 Not Modified status.
http/status.go:80
Method
IsServerError
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
Method
IsSuccess
IsSuccess reports whether s is in the Successful (2xx) status code class, as defined by RFC 7231 section 6.3.
http/status.go:63
Method
IsTLS
()
http/proto.go:23
Function
JSONUnmarshal
JSONMarshal returns a response Handler that unmarshals the JSON response into dst.
httpclient/httpclient.go:273
Method
Jar
Jar ... NOTE: see package comment about builder pattern.
httpclient/httpclient.go:188
Method
LimitBytes
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
Method
Major
()
http/proto.go:15
Method
Minor
()
http/proto.go:19
Function
NewGet
NewGet returns a new GET request to the provided URL.
httpclient/httpclient.go:59
Function
NewHead
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
Function
NewPost
NewPost returns a new POST request to the provided URL.
httpclient/httpclient.go:68
Function
NewPut
NewPut returns a new PUT request to the provided URL.
httpclient/httpclient.go:71
Function
NewStatus
(code int, text string)
http/status.go:22
Method
PermitsResponseBody
PermitsResponseBody reports whether the status code s permits having a response body.
http/status.go:59
Method
Pool
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
Method
Protocol
Protocol returns the protocol being used to talk to the server.
httpclient/httpclient.go:241
Method
ReadHTTP
(HandlerState)
httpclient/httpclient.go:302
Method
ReadHTTP
(s HandlerState)
httpclient/httpclient.go:308
Method
RedirectPolicy
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
Method
RequestBodyAllowed
()
http/method.go:26
Method
RequestBodyCommon
()
http/method.go:30
Method
ResponseBodyAllowed
()
http/method.go:34
Method
RestartableBody
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
Method
SetTrailer
SetTrailer sets the trailer k to the value v, overwriting any previous values. NOTE: see package comment about builder pattern.
httpclient/httpclient.go:132
Method
Status
()
httpclient/httpclient.go:291
Method
String
String returns a combination of the Code and Text in the form of "200 OK".
http/status.go:53
Method
Text
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
Method
Timeout
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
Method
Trailer
()
httpclient/httpclient.go:294
Method
Valid
Valid reports whether the status is in a known range (1xx to 5xx).
http/status.go:30
Method
isRequestOpt
()
httpclient/httpclient.go:38
Method
unexported
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
Method
unexported
()
httpclient/httpclient.go:296