Documentation ¶
Index ¶
- func CloneHeader(in http.Header) http.Header
- func CloneRequest(req *http.Request) *http.Request
- func NewBearerAuthRoundTripper(bearer string, rt http.RoundTripper) http.RoundTripper
- type HTTPClient
- type Interface
- type RESTClient
- type Request
- func (r *Request) Do() (*http.Response, error)
- func (r *Request) Headers() *http.Header
- func (r *Request) Path(path string) *Request
- func (r *Request) SetHeader(key, value string) *Request
- func (r *Request) SetParam(key, value string) *Request
- func (r *Request) SubPath(subpath string) *Request
- func (r *Request) URL() *url.URL
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneRequest ¶
Create shallow copy of request with deep copy of the headers
func NewBearerAuthRoundTripper ¶
func NewBearerAuthRoundTripper(bearer string, rt http.RoundTripper) http.RoundTripper
Types ¶
type RESTClient ¶
Implenents Interface
func NewRESTClient ¶
func (*RESTClient) Get ¶
func (c *RESTClient) Get() *Request
func (*RESTClient) Verb ¶
func (c *RESTClient) Verb(verb string) *Request
func (*RESTClient) Version ¶
func (c *RESTClient) Version() string
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Implements HTTPClient
func NewRequest ¶
Click to show internal directories.
Click to hide internal directories.