Documentation ¶
Overview ¶
Package http provides custom http transport implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoggedTransport ¶
type LoggedTransport struct { // Pattern for blocked URLs. Body of blocked URLs will not be logged. BlockedResponseURLs []string }
LoggedTransport adds request slog logging.
Responses with status code below 400 are logged with INFO level. Responses with status code of 400 or higher are logged with WARNING level. When DEBUG logging is enabled, will also log details of request and response including headers. Authorization headers in requests are redacted. Can redact response bodies for URLs (e.g. which would contain tokens)
type LoggedTransportWithRetries ¶
type LoggedTransportWithRetries struct { MaxRetries int StatusCodesToRetry []int DelayMilliseconds int // Pattern for blocked URLs. Body of blocked URLs will not be logged. BlockedResponseURLs []string }
LoggedTransportWithRetries adds request logging and automatic retrying for common HTTP errors.
Click to show internal directories.
Click to hide internal directories.