Documentation
¶
Overview ¶
Package httputil provides basic utilities for working with and inspecting HTTP requests and responses.
Index ¶
Constants ¶
View Source
const RequestID = "X-Request-ID"
RequestID is the name of the header expected to contain a unique identifier for incoming requests and their matching outgoing responses.
Variables ¶
This section is empty.
Functions ¶
func DumpRequest ¶
// DumpRequest prints r to stderr including headers and the request body. The request is reset after printing so it's safe to reuse. If the request can't be dumped, an error is emitted to stderr instead.
func DumpResponse ¶
DumpResponse prints resp to stderr including the headers and body. The response is reset after printing so it's safe to reuse. If the response can't be dumped, an error is emitted to stderr instead.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.