Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
NewClient sets up a new libhttp.Client. The client has http.Client's default values with the following exceptions: HTTP2 is forced; TLS12 or greater; additional RootCAs from provided files and from predefined authorities. Takes none or more optional files to add as certificates to the client.
func (Client) Do ¶
Do is a wrapper around http.do that error checks and decodes the response to the (optional) destination. 'dst' is an optional destination pointer that must be either implementing io.writer or a struct to be populated by JSON data. As 'dst' is a variadic argument, multiple 'dst' may be passed. However; any additional destinations are ignored with no error.
func (Client) Get ¶
Get is a simplified way to do a HTTP GET request by just having a url and (optionally) a destination for the response. 'dst' is an optional destination pointer that must be either implementing io.writer or a struct to be populated by JSON data. As 'dst' is a variadic argument, multiple 'dst' may be passed. However; any additional destinations are ignored with no error.
func (Client) PostForm ¶
PostForm is a wrapper around http.PostForm that takes a map as input, and makes error checks and decodes the response to the (optional) destination. 'dst' is an optional destination pointer that must be either implementing io.writer or a struct to be populated by JSON data. As 'dst' is a variadic argument, multiple 'dst' may be passed. However; any additional destinations are ignored with no error.