Documentation ¶
Index ¶
- Variables
- type HttpRequest
- func (r *HttpRequest) Accepting(mimeType string) *HttpRequest
- func (r *HttpRequest) Delete() ([]byte, error)
- func (r *HttpRequest) DeleteContent(content []byte) ([]byte, error)
- func (r *HttpRequest) DeleteReturningJson(o interface{}) error
- func (r *HttpRequest) Do(method string) ([]byte, error)
- func (r *HttpRequest) DoWithResponse(method string) (*http.Response, error)
- func (r *HttpRequest) Get() ([]byte, error)
- func (r *HttpRequest) GetJson(o interface{}) error
- func (r *HttpRequest) IgnoringSsl(ignore bool) *HttpRequest
- func (r *HttpRequest) PostContent(content []byte) ([]byte, error)
- func (r *HttpRequest) Put() ([]byte, error)
- func (r *HttpRequest) Sending(mimeType string) *HttpRequest
- func (r *HttpRequest) WithAuthorization(authorization string) *HttpRequest
- func (r *HttpRequest) WithBearerToken(authorization string) *HttpRequest
- func (r *HttpRequest) WithContent(content []byte) *HttpRequest
- func (r *HttpRequest) WithHeader(key, value string) *HttpRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var (
InvalidUrlError = errors.New("invalid url")
)
Functions ¶
This section is empty.
Types ¶
type HttpRequest ¶
type HttpRequest struct {
// contains filtered or unexported fields
}
func Request ¶
func Request(urlComponents ...string) *HttpRequest
func (*HttpRequest) Accepting ¶
func (r *HttpRequest) Accepting(mimeType string) *HttpRequest
func (*HttpRequest) Delete ¶
func (r *HttpRequest) Delete() ([]byte, error)
func (*HttpRequest) DeleteContent ¶
func (r *HttpRequest) DeleteContent(content []byte) ([]byte, error)
func (*HttpRequest) DeleteReturningJson ¶
func (r *HttpRequest) DeleteReturningJson(o interface{}) error
func (*HttpRequest) DoWithResponse ¶
func (r *HttpRequest) DoWithResponse(method string) (*http.Response, error)
func (*HttpRequest) Get ¶
func (r *HttpRequest) Get() ([]byte, error)
func (*HttpRequest) GetJson ¶
func (r *HttpRequest) GetJson(o interface{}) error
func (*HttpRequest) IgnoringSsl ¶
func (r *HttpRequest) IgnoringSsl(ignore bool) *HttpRequest
func (*HttpRequest) PostContent ¶
func (r *HttpRequest) PostContent(content []byte) ([]byte, error)
func (*HttpRequest) Put ¶
func (r *HttpRequest) Put() ([]byte, error)
func (*HttpRequest) Sending ¶
func (r *HttpRequest) Sending(mimeType string) *HttpRequest
func (*HttpRequest) WithAuthorization ¶
func (r *HttpRequest) WithAuthorization(authorization string) *HttpRequest
func (*HttpRequest) WithBearerToken ¶
func (r *HttpRequest) WithBearerToken(authorization string) *HttpRequest
func (*HttpRequest) WithContent ¶
func (r *HttpRequest) WithContent(content []byte) *HttpRequest
func (*HttpRequest) WithHeader ¶
func (r *HttpRequest) WithHeader(key, value string) *HttpRequest
Click to show internal directories.
Click to hide internal directories.