Documentation ¶
Index ¶
- Constants
- func InitClient()
- type Request
- func (r *Request) Body() io.ReadCloser
- func (r *Request) GenerateUrl() string
- func (r *Request) Header(key string) string
- func (r *Request) Headers() map[string]string
- func (r *Request) Host() string
- func (r *Request) Method() string
- func (r *Request) Param(key string) []string
- func (r *Request) Params() map[string][]string
- func (r *Request) Port() int
- func (r *Request) QueryString() string
- func (r *Request) SetBody(stream io.ReadCloser)
- func (r *Request) SetHeader(key, value string)
- func (r *Request) SetHeaders(headers map[string]string)
- func (r *Request) SetHost(host string)
- func (r *Request) SetMethod(method string)
- func (r *Request) SetParam(key, value string)
- func (r *Request) SetParams(params map[string][]string)
- func (r *Request) SetPort(port int)
- func (r *Request) SetTimeout(timeout int)
- func (r *Request) SetUri(uri string)
- func (r *Request) String() string
- func (r *Request) Timeout() int
- func (r *Request) Uri() string
- type Response
- func (r *Response) Body() io.ReadCloser
- func (r *Response) ContentLength() int64
- func (r *Response) ElapsedTime() time.Duration
- func (r *Response) GetHeader(name string) string
- func (r *Response) GetHeaders() map[string]string
- func (r *Response) HttpResponse() *http.Response
- func (r *Response) Protocol() string
- func (r *Response) SetHttpResponse(response *http.Response)
- func (r *Response) StatusCode() int
- func (r *Response) StatusText() string
Constants ¶
View Source
const ( GET = "GET" PUT = "PUT" POST = "POST" DELETE = "DELETE" HEAD = "HEAD" OPTIONS = "OPTIONS" PATCH = "PATCH" )
Constants of the supported HTTP methods for paddleFlow
Variables ¶
This section is empty.
Functions ¶
func InitClient ¶
func InitClient()
Types ¶
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func (*Request) Body ¶
func (r *Request) Body() io.ReadCloser
func (*Request) GenerateUrl ¶
func (*Request) QueryString ¶
func (*Request) SetBody ¶
func (r *Request) SetBody(stream io.ReadCloser)
func (*Request) SetHeaders ¶
func (*Request) SetTimeout ¶
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func Execute ¶
Execute - do the http requset and get the response
PARAMS:
- request: the http request instance to be sent
RETURNS:
- response: the http response returned from the server
- error: nil if ok otherwise the specific error
func (*Response) Body ¶
func (r *Response) Body() io.ReadCloser
func (*Response) ContentLength ¶
func (*Response) ElapsedTime ¶
func (*Response) GetHeaders ¶
func (*Response) HttpResponse ¶
func (*Response) SetHttpResponse ¶
func (*Response) StatusCode ¶
func (*Response) StatusText ¶
Click to show internal directories.
Click to hide internal directories.