Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoRequest = "no request has been set" // Error message for when no request has been set ErrNoCallback = "no callback has been set" // Error message for when no callback has been set ErrNoEncoding = "no encoding has been set or is not valid" // Error message for when no encoding has been set )
Define standard error messages
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Initialize a GET request Get(url string) Client // Initialize a POST request Post(url string) Client // Initialize a PUT request Put(url string) Client // Initialize a PATCH request Patch(url string) Client // Initialize a DELETE request Delete(url string) Client // Initialize a OPTIONS request Options(url string) Client // Initialize a HEAD request Head(url string) Client // Add form data to the request WithData(formData map[string]interface{}, encoding Encoding, file ...encoders.File) Client // Add a header to the request WithHeader(header map[string]string) Client // Add a query to the request WithQuery(query map[string]string) Client }
type Methods ¶
type Methods string
Define methods and encodings type
const ( GET Methods = "GET" // GET method POST Methods = "POST" // POST method PUT Methods = "PUT" // PUT method PATCH Methods = "PATCH" // PATCH method DELETE Methods = "DELETE" // DELETE method OPTIONS Methods = "OPTIONS" // OPTIONS method HEAD Methods = "HEAD" // HEAD method TRACE Methods = "TRACE" // TRACE method )
Define request methods
Click to show internal directories.
Click to hide internal directories.