Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultUserAgent = "Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0"
)
Variables ¶
View Source
var ( ErrUnsupportedContentType = &UnsupportedContentTypeError{ ErrHTTPError{ StatusCode: http.StatusUnsupportedMediaType, Status: http.StatusText(http.StatusUnsupportedMediaType), Message: "Unsupported content type", }, } )
Functions ¶
This section is empty.
Types ¶
type ErrHTTPError ¶
func NewHTTPError ¶
func NewHTTPError(resp *http.Response) ErrHTTPError
TODO: Change return value to pointer (or at least make it consistent with UnsupportedContentTypeError)
func (ErrHTTPError) Error ¶
func (e ErrHTTPError) Error() string
func (ErrHTTPError) String ¶
func (e ErrHTTPError) String() string
type UnsupportedContentTypeError ¶
type UnsupportedContentTypeError struct {
ErrHTTPError
}
func NewUnsupportedContentTypeError ¶
func NewUnsupportedContentTypeError(contentType string) *UnsupportedContentTypeError
func (UnsupportedContentTypeError) Is ¶
func (e UnsupportedContentTypeError) Is(target error) bool
Makes errors.Is(err, ErrUnsupportedContentType) return true for any instance of UnsupportedContentTypeError
Click to show internal directories.
Click to hide internal directories.