Documentation
¶
Index ¶
- func ContentSubtype(contentType string) string
- func ContentType(subtype string) string
- func ResetContentType(subtype, fullType string)
- type Body
- type Option
- func WithClient(client *http.Client) Option
- func WithContentType(contentType string) Option
- func WithContentTypeFormData(boundary string) Option
- func WithContentTypeJson() Option
- func WithContentTypeUrlencoded() Option
- func WithHeader(name string, val ...string) Option
- func WithTLS(tlsCert *tls.ConnectionState) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentSubtype ¶
ContentSubtype returns the content-subtype for the given content-type. The given content-type must be a valid content-type that starts with but no content-subtype will be returned. according rfc7231. contentType is assumed to be lowercase already.
func ContentType ¶
ContentType returns the content-type with base prefix.
func ResetContentType ¶
func ResetContentType(subtype, fullType string)
Types ¶
type Option ¶
type Option func(o *options)
func WithClient ¶
func WithContentType ¶ added in v0.1.32
func WithContentTypeFormData ¶
func WithContentTypeJson ¶
func WithContentTypeJson() Option
func WithContentTypeUrlencoded ¶
func WithContentTypeUrlencoded() Option
func WithHeader ¶
func WithTLS ¶
func WithTLS(tlsCert *tls.ConnectionState) Option
Click to show internal directories.
Click to hide internal directories.