Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasStatusCode ¶
HasStatusCode returns true if the Response's status code is one of the specified values. Exported as runtime.HasStatusCode().
func Payload ¶
func Payload(resp *http.Response, opts *PayloadOptions) ([]byte, error)
Payload reads and returns the response body or an error. On a successful read, the response body is cached. Subsequent reads will access the cached value. Exported as runtime.Payload() WITHOUT the opts parameter.
func PayloadDownloaded ¶
PayloadDownloaded returns true if the response body has already been downloaded. This implies that the Payload() func above has been previously called. NOT exported but used by azcore.
Types ¶
type PayloadOptions ¶
type PayloadOptions struct { // BytesModifier receives the downloaded byte slice and returns an updated byte slice. // Use this to modify the downloaded bytes in a payload (e.g. removing a BOM). BytesModifier func([]byte) []byte }
PayloadOptions contains the optional values for the Payload func. NOT exported but used by azcore.
Click to show internal directories.
Click to hide internal directories.