Documentation ¶
Index ¶
- Constants
- func NewHTTPClient(opts ...HTTPClientOption) *http.Client
- type HTTPClientOption
- func HTTPClientWithCheckRedirect(o func(req *http.Request, via []*http.Request) error) HTTPClientOption
- func HTTPClientWithDialContext(o func(ctx context.Context, network, addr string) (net.Conn, error)) HTTPClientOption
- func HTTPClientWithDialTLSContext(o func(ctx context.Context, network, addr string) (net.Conn, error)) HTTPClientOption
- func HTTPClientWithDisableCompression(o bool) HTTPClientOption
- func HTTPClientWithDisableKeepAlives(o bool) HTTPClientOption
- func HTTPClientWithExpectContinueTimeout(o time.Duration) HTTPClientOption
- func HTTPClientWithForceAttemptHTTP2(o bool) HTTPClientOption
- func HTTPClientWithGetProxyConnectHeader(...) HTTPClientOption
- func HTTPClientWithIdleConnTimeout(o time.Duration) HTTPClientOption
- func HTTPClientWithJar(o http.CookieJar) HTTPClientOption
- func HTTPClientWithMaxConnsPerHost(o int) HTTPClientOption
- func HTTPClientWithMaxIdleConns(o int) HTTPClientOption
- func HTTPClientWithMaxIdleConnsPerHost(o int) HTTPClientOption
- func HTTPClientWithMaxResponseHeaderBytes(o int64) HTTPClientOption
- func HTTPClientWithProxy(o func(request *http.Request) (*url.URL, error)) HTTPClientOption
- func HTTPClientWithProxyConnectHeader(o http.Header) HTTPClientOption
- func HTTPClientWithReadBufferSize(o int) HTTPClientOption
- func HTTPClientWithResponseHeaderTimeout(o time.Duration) HTTPClientOption
- func HTTPClientWithRoundTripware(l *zap.Logger, roundTripware ...roundtripware.RoundTripware) HTTPClientOption
- func HTTPClientWithTLSClientConfig(o *tls.Config) HTTPClientOption
- func HTTPClientWithTLSHandshakeTimeout(o time.Duration) HTTPClientOption
- func HTTPClientWithTLSNextProto(o map[string]func(authority string, c *tls.Conn) http.RoundTripper) HTTPClientOption
- func HTTPClientWithTimeout(o time.Duration) HTTPClientOption
- func HTTPClientWithTransport(o http.RoundTripper) HTTPClientOption
- func HTTPClientWithWriteBufferSize(o int) HTTPClientOption
Constants ¶
View Source
const ( HeaderAccept = "Accept" HeaderAcceptEncoding = "Accept-Encoding" HeaderAllow = "Allow" HeaderAuthorization = "Authorization" HeaderContentDisposition = "Content-Disposition" HeaderContentEncoding = "Content-Encoding" HeaderContentLength = "Content-Length" HeaderContentType = "Content-Type" HeaderCookie = "Cookie" HeaderSetCookie = "Set-Cookie" HeaderIfModifiedSince = "If-Modified-Since" HeaderLastModified = "Last-Modified" HeaderLocation = "Location" HeaderUpgrade = "Upgrade" HeaderVary = "Vary" HeaderWWWAuthenticate = "WWW-Authenticate" HeaderXForwardedFor = "X-Forwarded-For" HeaderXForwardedProto = "X-Forwarded-Proto" HeaderXForwardedProtocol = "X-Forwarded-Protocol" HeaderXForwardedSsl = "X-Forwarded-Ssl" HeaderXUrlScheme = "X-Url-Scheme" HeaderXHTTPMethodOverride = "X-HTTP-Method-Override" HeaderXRealIP = "X-Real-IP" HeaderXResponseTime = "X-Response-Time" HeaderXPoweredBy = "X-Powered-By" HeaderXRequestID = "X-Request-ID" HeaderXRequestedWith = "X-Requested-With" HeaderXSessionID = "X-Session-ID" HeaderXTrackingID = "X-Tracking-ID" HeaderXError = "X-Error" HeaderXRuntime = "X-Runtime" HeaderServer = "Server" HeaderOrigin = "Origin" HeaderUserAgent = "User-Agent" // Access control HeaderAccessControlRequestMethod = "Access-Control-Request-Method" HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers" HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin" HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods" HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers" HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials" HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers" HeaderAccessControlMaxAge = "Access-Control-Max-Age" // Security HeaderStrictTransportSecurity = "Strict-Transport-Security" HeaderXContentTypeOptions = "X-Content-Type-Options" HeaderXXSSProtection = "X-XSS-Protection" HeaderXFrameOptions = "X-Frame-Options" HeaderContentSecurityPolicy = "Content-Security-Policy" HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only" HeaderXCSRFToken = "X-CSRF-Token" //nolint:gosec HeaderReferrerPolicy = "Referrer-Policy" // Telementry HeaderTraceParent = "Traceparent" HeaderTraceState = "Tracestate" )
View Source
const (
HeaderValueAuthorizationPrefix = "Bearer "
)
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶ added in v0.6.0
func NewHTTPClient(opts ...HTTPClientOption) *http.Client
Types ¶
type HTTPClientOption ¶ added in v0.6.0
func HTTPClientWithCheckRedirect ¶ added in v0.6.0
func HTTPClientWithDialContext ¶ added in v0.6.0
func HTTPClientWithDialTLSContext ¶ added in v0.6.0
func HTTPClientWithDisableCompression ¶ added in v0.6.0
func HTTPClientWithDisableCompression(o bool) HTTPClientOption
func HTTPClientWithDisableKeepAlives ¶ added in v0.6.0
func HTTPClientWithDisableKeepAlives(o bool) HTTPClientOption
func HTTPClientWithExpectContinueTimeout ¶ added in v0.6.0
func HTTPClientWithExpectContinueTimeout(o time.Duration) HTTPClientOption
func HTTPClientWithForceAttemptHTTP2 ¶ added in v0.6.0
func HTTPClientWithForceAttemptHTTP2(o bool) HTTPClientOption
func HTTPClientWithGetProxyConnectHeader ¶ added in v0.6.0
func HTTPClientWithIdleConnTimeout ¶ added in v0.6.0
func HTTPClientWithIdleConnTimeout(o time.Duration) HTTPClientOption
func HTTPClientWithJar ¶ added in v0.6.0
func HTTPClientWithJar(o http.CookieJar) HTTPClientOption
func HTTPClientWithMaxConnsPerHost ¶ added in v0.6.0
func HTTPClientWithMaxConnsPerHost(o int) HTTPClientOption
func HTTPClientWithMaxIdleConns ¶ added in v0.6.0
func HTTPClientWithMaxIdleConns(o int) HTTPClientOption
func HTTPClientWithMaxIdleConnsPerHost ¶ added in v0.6.0
func HTTPClientWithMaxIdleConnsPerHost(o int) HTTPClientOption
func HTTPClientWithMaxResponseHeaderBytes ¶ added in v0.6.0
func HTTPClientWithMaxResponseHeaderBytes(o int64) HTTPClientOption
func HTTPClientWithProxy ¶ added in v0.6.0
func HTTPClientWithProxyConnectHeader ¶ added in v0.6.0
func HTTPClientWithProxyConnectHeader(o http.Header) HTTPClientOption
func HTTPClientWithReadBufferSize ¶ added in v0.6.0
func HTTPClientWithReadBufferSize(o int) HTTPClientOption
func HTTPClientWithResponseHeaderTimeout ¶ added in v0.6.0
func HTTPClientWithResponseHeaderTimeout(o time.Duration) HTTPClientOption
func HTTPClientWithRoundTripware ¶ added in v0.6.0
func HTTPClientWithRoundTripware(l *zap.Logger, roundTripware ...roundtripware.RoundTripware) HTTPClientOption
func HTTPClientWithTLSClientConfig ¶ added in v0.6.0
func HTTPClientWithTLSClientConfig(o *tls.Config) HTTPClientOption
func HTTPClientWithTLSHandshakeTimeout ¶ added in v0.6.0
func HTTPClientWithTLSHandshakeTimeout(o time.Duration) HTTPClientOption
func HTTPClientWithTLSNextProto ¶ added in v0.6.0
func HTTPClientWithTLSNextProto(o map[string]func(authority string, c *tls.Conn) http.RoundTripper) HTTPClientOption
func HTTPClientWithTimeout ¶ added in v0.6.0
func HTTPClientWithTimeout(o time.Duration) HTTPClientOption
func HTTPClientWithTransport ¶ added in v0.6.0
func HTTPClientWithTransport(o http.RoundTripper) HTTPClientOption
func HTTPClientWithWriteBufferSize ¶ added in v0.6.0
func HTTPClientWithWriteBufferSize(o int) HTTPClientOption
Click to show internal directories.
Click to hide internal directories.