Documentation
¶
Overview ¶
Package rest allows for quick and easy access any REST or REST-like API.
Index ¶
Constants ¶
View Source
const Version = "2.6.0"
Version represents the current version of the rest library
Variables ¶
View Source
var DefaultClient = &Client{HTTPClient: http.DefaultClient}
DefaultClient is used if no custom HTTP client is defined
Functions ¶
func AddQueryParameters ¶
AddQueryParameters adds query parameters to the URL.
func BuildRequestObject ¶
BuildRequestObject creates the HTTP request object.
Types ¶
type Client ¶
Client allows modification of client headers, redirect policy and other settings See https://golang.org/pkg/net/http
func (*Client) MakeRequest ¶
MakeRequest makes the API call.
type Request ¶
type Request struct { Method Method BaseURL string // e.g. https://api.sendgrid.com Headers map[string]string QueryParams map[string]string Body []byte }
Request holds the request to an API Call.
Click to show internal directories.
Click to hide internal directories.