package http
Import Path
github.com/aws/aws-sdk-go-v2/aws/transport/http (on go.dev)
Dependency Relation
imports 15 packages, and imported by 2 packages
Involved Source Files
client.go
content_type.go
response_error.go
response_error_middleware.go
timeout_read_closer.go
Package-Level Type Names (total 9, in which 3 are exported)
BuildableClient provides a HTTPClient implementation with options to
create copies of the HTTPClient when additional configuration is provided.
The client's methods will not share the http.Transport value between copies
of the BuildableClient. Only exported member values of the Transport and
optional Dialer will be copied between copies of BuildableClient.
client *http.Client
clientTimeout time.Duration
dialer *net.Dialer
initOnce sync.Once
transport *http.Transport
Do implements the HTTPClient interface's Do method to invoke a HTTP request,
and receive the response. Uses the BuildableClient's current
configuration to invoke the http.Request.
If connection pooling is enabled (aka HTTP KeepAlive) the client will only
share pooled connections with its own instance. Copies of the
BuildableClient will have their own connection pools.
Redirect (3xx) responses will not be followed, the HTTP response received
will returned instead.
Freeze returns a frozen aws.HTTPClient implementation that is no longer a BuildableClient.
Use this to prevent the SDK from applying DefaultMode configuration values to a buildable client.
GetDialer returns a copy of the client's network dialer.
GetTimeout returns a copy of the client's timeout to cancel requests with.
GetTransport returns a copy of the client's HTTP Transport.
WithDialerOptions copies the BuildableClient and returns it with the
net.Dialer options applied. Will set the client's http.Transport DialContext
member.
WithTimeout Sets the timeout used by the client for all requests.
WithTransportOptions copies the BuildableClient and returns it with the
http.Transport options applied.
If a non (*http.Transport) was set as the round tripper, the round tripper
will be replaced with a default Transport value before invoking the option
functions.
(*BuildableClient) build()
(*BuildableClient) clone() *BuildableClient
*BuildableClient : github.com/aws/aws-sdk-go-v2/aws.HTTPClient
*BuildableClient : github.com/aws/aws-sdk-go-v2/service/s3.HTTPClient
*BuildableClient : github.com/aws/smithy-go/transport/http.ClientDo
*BuildableClient : go.pact.im/x/httpclient.Client
func NewBuildableClient() *BuildableClient
func (*BuildableClient).WithDialerOptions(opts ...func(*net.Dialer)) *BuildableClient
func (*BuildableClient).WithTimeout(timeout time.Duration) *BuildableClient
func (*BuildableClient).WithTransportOptions(opts ...func(*http.Transport)) *BuildableClient
func (*BuildableClient).clone() *BuildableClient
ResponseError provides the HTTP centric error type wrapping the underlying error
with the HTTP response value and the deserialized RequestID.
RequestID associated with response error
ResponseError *smithyhttp.ResponseError
ResponseError.Err error
ResponseError.Response *http.Response
As populates target and returns true if the type of target is a error type that
the ResponseError embeds, (e.g.AWS HTTP ResponseError)
Error returns the formatted error
HTTPResponse returns the HTTP response received from the service.
HTTPStatusCode returns the HTTP response status code received from the service.
ServiceRequestID returns the request id associated with Response Error
Unwrap returns the nested error if any, or nil.
*ResponseError : error
ResponseTimeoutError is an error when the reads from the response are
delayed longer than the timeout the read was configured for.
TimeoutDur time.Duration
(*ResponseTimeoutError) Error() string
Timeout returns that the error is was caused by a timeout, and can be
retried.
*ResponseTimeoutError : error
*ResponseTimeoutError : github.com/go-pg/pg/v10.timeoutError
*ResponseTimeoutError : net.timeout
*ResponseTimeoutError : os.timeout
Package-Level Functions (total 9, in which 4 are exported)
AddResponseErrorMiddleware adds response error wrapper middleware
AddResponseReadTimeoutMiddleware adds a middleware to the stack that wraps the
response body so that a read that takes too long will return an error.
NewBuildableClient returns an initialized client for invoking HTTP
requests.
RemoveContentTypeHeader removes content-type header if
content length is unset or equal to zero.
Package-Level Variables (total 8, all are exported)
Timeouts for net.Dialer's network connection.
Timeouts for net.Dialer's network connection.
Defaults for the HTTPTransportBuilder.
Default connection timeouts
Default connection pool options
Defaults for the HTTPTransportBuilder.
Defaults for the HTTPTransportBuilder.
Default to TLS 1.2 for all HTTPS requests.
Package-Level Constants (only one, which is unexported)
The pages are generated with Golds v0.4.9. (GOOS=linux GOARCH=amd64)