Documentation
¶
Index ¶
- type Dict
- type List
- type Session
- func (s *Session) BasicAuth(username string, password string)
- func (s *Session) Delete(url string, body *[]byte, headers *map[string]string, query *map[string]string) (*http.Response, error)
- func (s *Session) DissableSSL()
- func (s *Session) Get(url string, headers *map[string]string, query *map[string]string) (*http.Response, error)
- func (s *Session) GetBody(resp *http.Response) (string, error)
- func (s *Session) Post(url string, body *[]byte, headers *map[string]string, query *map[string]string) (*http.Response, error)
- func (s *Session) Put(url string, body *[]byte, headers *map[string]string, query *map[string]string) (*http.Response, error)
- func (s *Session) Request(method string, url string, body *[]byte, headers *map[string]string, ...) (*http.Response, error)
- func (s *Session) SetHeaders(req *http.Request, headers *map[string]string)
- func (s *Session) SetQueryParams(req *http.Request, query *map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
Session is a wrapper over builtin http module from go
func (*Session) Delete ¶
func (s *Session) Delete(url string, body *[]byte, headers *map[string]string, query *map[string]string) (*http.Response, error)
Delete resuest
func (*Session) DissableSSL ¶ added in v0.0.4
func (s *Session) DissableSSL()
DissableSSL dissables ssl verification for the client
func (*Session) Get ¶
func (s *Session) Get(url string, headers *map[string]string, query *map[string]string) (*http.Response, error)
Get resuest
func (*Session) GetBody ¶
GetBody returns the string representation of the response boddy and closes the response body buffer
func (*Session) Post ¶
func (s *Session) Post(url string, body *[]byte, headers *map[string]string, query *map[string]string) (*http.Response, error)
Post resuest
func (*Session) Put ¶
func (s *Session) Put(url string, body *[]byte, headers *map[string]string, query *map[string]string) (*http.Response, error)
Put resuest
func (*Session) Request ¶
func (s *Session) Request(method string, url string, body *[]byte, headers *map[string]string, query *map[string]string) (*http.Response, error)
Request returns a http.Response object with the proper method, url, body, headers and query params
func (*Session) SetHeaders ¶
SetHeaders adds headers to the request
Click to show internal directories.
Click to hide internal directories.