Documentation ¶
Overview ¶
Package httputils contains assorted HTTP-related functionality.
Index ¶
Constants ¶
View Source
const ( AuthorizationHeader = "Authorization" ContentTypeHeader = "Content-Type" ContentTypeJSON = "application/json" ContentTypeJSONUTF8 = "application/json;charset=utf-8" ContentTypeProblemJSON = "application/problem+json" )
HTTP header constants.
Variables ¶
This section is empty.
Functions ¶
func ConsumeAndCloseResponseBody ¶
ConsumeAndCloseResponseBody discards any remaining contents in an HTTP response body and closes it.
func VerifyRequestContentType ¶
VerifyRequestContentType returns an error if the media type in the HTTP response Content-Type header, excluding any parameters, does not match the provided media type.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.