Package: http

import "../ibm-cos-sdk-go-v2/aws/transport/http"

Variables

var DefaultHTTPTransportMaxIdleConns = writable

Default connection pool options

Value:

100
var DefaultHTTPTransportMaxIdleConnsPerHost = writable

Value:

10
var DefaultHTTPTransportIdleConnTimeout = writable

Default connection timeouts

Value:

90 * time.Second
var DefaultHTTPTransportTLSHandleshakeTimeout = writable

Value:

10 * time.Second
var DefaultHTTPTransportExpectContinueTimeout = writable

Value:

1 * time.Second
var DefaultHTTPTransportTLSMinVersion uint16 = writable

Default to TLS 1.2 for all HTTPS requests.

Value:

tls.VersionTLS12
var DefaultDialConnectTimeout = writable

Value:

30 * time.Second
var DefaultDialKeepAliveTimeout = writable

Value:

30 * time.Second

Type Summary collapse

Function Summary collapse

Function Details

func AddResponseErrorMiddleware(stack *middleware.Stack) error

AddResponseErrorMiddleware adds response error wrapper middleware



11
12
13
14
15
// File 'aws/transport/http/response_error_middleware.go', line 11

func AddResponseErrorMiddleware(stack *middleware.Stack) error { // add error wrapper middleware before request id retriever middleware so that it can wrap the error response // returned by operation deserializers return stack.Deserialize.Insert(&ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) }

func AddResponseReadTimeoutMiddleware(stack *middleware.Stack, duration time.Duration) error

AddResponseReadTimeoutMiddleware adds a middleware to the stack that wraps the response body so that a read that takes too long will return an error.



66
67
68
// File 'aws/transport/http/timeout_read_closer.go', line 66

func AddResponseReadTimeoutMiddleware(stack *middleware.Stack, duration time.Duration) error { return stack.Deserialize.Add(&readTimeout{duration: duration}, middleware.After) }

func RemoveContentTypeHeader(stack *middleware.Stack) error

RemoveContentTypeHeader removes content-type header if content length is unset or equal to zero.



39
40
41
// File 'aws/transport/http/content_type.go', line 39

func RemoveContentTypeHeader(stack *middleware.Stack) error { return stack.Build.Add(&removeContentTypeHeader{}, middleware.After) }