Documentation ¶
Index ¶
- type HttpRequest
- func (r *HttpRequest) BODY(body interface{}) *HttpRequest
- func (r *HttpRequest) DELETE(url string, params ...RequestParameters) *HttpRequest
- func (r *HttpRequest) Do() *HttpRequest
- func (r *HttpRequest) Fetch(data interface{}) (status int, err error)
- func (r *HttpRequest) GET(url string, params ...RequestParameters) *HttpRequest
- func (r *HttpRequest) HEADER(head string, value string) *HttpRequest
- func (r *HttpRequest) PASSWORD(password string) *HttpRequest
- func (r *HttpRequest) PATCH(url string, params ...RequestParameters) *HttpRequest
- func (r *HttpRequest) POST(url string, params ...RequestParameters) *HttpRequest
- func (r *HttpRequest) PUT(url string, params ...RequestParameters) *HttpRequest
- func (r *HttpRequest) Result() (status int, body []byte, err error)
- func (r *HttpRequest) ResultTo(result interface{}) (status int, err error)
- func (r *HttpRequest) String() (result string, err error)
- func (r *HttpRequest) USERNAME(username string) *HttpRequest
- type RequestParameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpRequest ¶
type HttpRequest struct { Base string URL string Method string Headers map[string]string Body interface{} Username, Password string ContentType string Response *http.Response StatusCode int Error error // contains filtered or unexported fields }
func NewHttpRequest ¶
func NewHttpRequest(base ...string) *HttpRequest
func (*HttpRequest) BODY ¶
func (r *HttpRequest) BODY(body interface{}) *HttpRequest
func (*HttpRequest) DELETE ¶
func (r *HttpRequest) DELETE(url string, params ...RequestParameters) *HttpRequest
func (*HttpRequest) Do ¶
func (r *HttpRequest) Do() *HttpRequest
func (*HttpRequest) Fetch ¶
func (r *HttpRequest) Fetch(data interface{}) (status int, err error)
func (*HttpRequest) GET ¶
func (r *HttpRequest) GET(url string, params ...RequestParameters) *HttpRequest
func (*HttpRequest) HEADER ¶
func (r *HttpRequest) HEADER(head string, value string) *HttpRequest
func (*HttpRequest) PASSWORD ¶
func (r *HttpRequest) PASSWORD(password string) *HttpRequest
func (*HttpRequest) PATCH ¶
func (r *HttpRequest) PATCH(url string, params ...RequestParameters) *HttpRequest
func (*HttpRequest) POST ¶
func (r *HttpRequest) POST(url string, params ...RequestParameters) *HttpRequest
func (*HttpRequest) PUT ¶
func (r *HttpRequest) PUT(url string, params ...RequestParameters) *HttpRequest
func (*HttpRequest) ResultTo ¶
func (r *HttpRequest) ResultTo(result interface{}) (status int, err error)
func (*HttpRequest) String ¶
func (r *HttpRequest) String() (result string, err error)
func (*HttpRequest) USERNAME ¶
func (r *HttpRequest) USERNAME(username string) *HttpRequest
type RequestParameters ¶
Click to show internal directories.
Click to hide internal directories.