Categorygithub.com/lucasepe/httplib
modulepackage
0.2.2
Repository: https://github.com/lucasepe/httplib.git
Documentation: pkg.go.dev

# README

httplib

# Functions

No description provided by the author
ChainHandlers allows for the composing of validators or response handlers.
CheckStatus validates the response has an acceptable status code.
No description provided by the author
DumpRequest dumps http.Request to the specified io.Writer.
DumpResponse dumps http.Response to the specified io.Writer.
ErrorJSON validates the response has an acceptable status code and if it's bad, attempts to marshal the JSON into the error object provided.
Fire calls the http.Client.Do() and validates and handles any resulting response.
FormData is a GetBodyFunc that builds an encoded form body.
FromJSON decodes a response as a JSON object.
No description provided by the author
HandleResponse composes the *http.Response validators with the handler.
HasStatusErr returns true if err is a ResponseError caused by any of the codes given.
InsecureSkipVerify controls whether a http.Client verifies the server's certificate chain and host name.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Post
No description provided by the author
No description provided by the author
No description provided by the author
ToJSON is a GetBodyFunc that marshals a JSON object.

# Structs

BasicAuth represent a HTTP basic auth.
No description provided by the author
No description provided by the author
TokenAuth implements an http.AuthMethod that can be used with http transport to authenticate with HTTP token authentication (also known as bearer authentication).
No description provided by the author

# Interfaces

AuthMethod is concrete implementation of common.AuthMethod for HTTP services.
No description provided by the author

# Type aliases

GetBodyFunc provides a Builder with a source for a request body.
No description provided by the author
HandleResponseFunc is used to validate or handle the response to a request.