Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents an http client It uses the native client from net/http package
type Request ¶
type Request struct {
// URL specifies URL to access.
Url string
// Method specifies the http method (GET, POST, PUT, etd.)
// An empty string means GET
Method string
// Body is the request body to be send with the request.
// A nil body means the request has no body.
Body []byte
// Headers contains the headers to be sent with the request
Headers map[string][]string
// QueryParams specifies the query parameters to be added in the request URL
QueryParams map[string][]string
}
Request represents a http request.
type Response ¶
type Response struct {
Status string // specifies the status of the response
StatusCode uint // specifies the http status code of response
Headers map[string][]string // headers set in the response
Body []byte // the response body
}
Response represents the response from an http request
Click to show internal directories.
Click to hide internal directories.