Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // HTTPClientTimeout specifies a time limit for requests made by a client HTTPClientTimeout = 10 * time.Second // EnableHttpDebug enable dump of requests and responses of HTTP requests (useful for debug) EnableDebug = false )
Functions ¶
func CaptureRoundTrip ¶
func CaptureRoundTrip(method, scheme, hostname, path, location string, query net_url.Values, headerInfo http.Header, doRedirect bool) (*CapturedRequest, *CapturedResponse, error)
CaptureRoundTrip will perform an HTTP request and return the CapturedRequest and CapturedResponse tuple
Types ¶
type CapturedRequest ¶
type CapturedRequest struct { Path string `json:"path"` Host string `json:"host"` Method string `json:"method"` Proto string `json:"proto"` Headers map[string][]string `json:"headers"` Namespace string `json:"namespace"` Ingress string `json:"ingress"` Service string `json:"service"` Pod string `json:"pod"` }
CapturedRequest contains the original HTTP request metadata as received by the echoserver handling the test request.
type CapturedResponse ¶
type CapturedResponse struct { StatusCode int ContentLength int64 Proto string Headers map[string][]string TLSHostname string Certificate *x509.Certificate }
CapturedResponse contains the HTTP response metadata from the echoserver.
Click to show internal directories.
Click to hide internal directories.