Documentation
¶
Overview ¶
Package http provides a net/http and a fetch implementation of http requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is the http client type (struct).
Values set on the Request override values set on Client.
type Request ¶
Request is the http request type (struct).
func NewRequest ¶
NewRequest constructs a new http request.
func NewRequestWithContext ¶
func NewRequestWithContext(ctx context.Context, method, url string, body io.Reader) (*Request, error)
NewRequestWithContext constructs a new http request with a context.
func (*Request) Clone ¶
Clone returns a deep copy of r with its context changed to ctx. The provided ctx must be non-nil.
Clone only makes a shallow copy of the Body field.
func (*Request) Context ¶
Context returns the request's context. To change the context, use Request.Clone or Request.WithContext.
The returned context is always non-nil; it defaults to the background context.
The context controls cancelation.