Documentation ¶
Index ¶
- Variables
- func BaseURL(ctx context.Context) *url.URL
- func ClientContext(parent context.Context, client *http.Client) context.Context
- func ClientFromContext(ctx context.Context) *http.Client
- func Host(ctx context.Context) string
- func RequestContext(ctx context.Context, w http.ResponseWriter, r *http.Request) context.Context
- func RequestFromContext(ctx context.Context) *http.Request
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultHost = ""
Functions ¶
func BaseURL ¶
BaseURL returns the "base" url for this request, defined as a url containing the Host and Scheme portions of the request uri.
func ClientContext ¶
ClientContext binds the provided client to a new context derived from the provided parent. Use httpx.ClientFromContext to retrieve the client at some later point.
func ClientFromContext ¶
ClientFromContext retrieves a http.Client that has been bound to this context previously by a call to httpx.ClientContext, defaulting to a default Client if none has been bound
func RequestContext ¶
RequestContext returns a context representing the provided http action.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.