Documentation
¶
Index ¶
- Variables
- func NewRecorder() *httptest.ResponseRecorder
- func NewRequestForTest(method, origurl string, args ...interface{}) (*http.Request, error)
- func RegisterCallback(callbacks ...Callback)
- func SetLogger(log io.Writer)
- type Auth
- type Callback
- type Datas
- type Files
- type Header
- type Params
- type Request
- func (req *Request) ClearCookies()
- func (req *Request) ClientSetCookies()
- func (req *Request) Close()
- func (req *Request) Delete(origurl string, args ...interface{}) (resp *Response, err error)
- func (req *Request) Do(method string, origurl string, args ...interface{}) (*Response, error)
- func (req *Request) Get(origurl string, args ...interface{}) (resp *Response, err error)
- func (req *Request) GetJson(origurl string, args ...interface{}) (resp *Response, err error)
- func (req *Request) Head(origurl string, args ...interface{}) (resp *Response, err error)
- func (req *Request) Options(origurl string, args ...interface{}) (resp *Response, err error)
- func (req *Request) Patch(origurl string, args ...interface{}) (resp *Response, err error)
- func (req *Request) Post(origurl string, args ...interface{}) (resp *Response, err error)
- func (req *Request) PostJson(origurl string, args ...interface{}) (resp *Response, err error)
- func (req *Request) Proxy(proxyurl string)
- func (req *Request) Put(origurl string, args ...interface{}) (resp *Response, err error)
- func (req *Request) PutJson(origurl string, args ...interface{}) (resp *Response, err error)
- func (req *Request) RegisterCallback(callbacks ...Callback)
- func (req *Request) RequestDebug()
- func (req *Request) SetCookie(cookie *http.Cookie)
- func (req *Request) SetTimeout(n time.Duration)
- func (req *Request) Trace(origurl string, args ...interface{}) (resp *Response, err error)
- func (req *Request) WithContext(ctx context.Context) *Request
- type Response
- func Delete(origurl string, args ...interface{}) (resp *Response, err error)
- func Get(origurl string, args ...interface{}) (resp *Response, err error)
- func GetJson(origurl string, args ...interface{}) (resp *Response, err error)
- func Head(origurl string, args ...interface{}) (resp *Response, err error)
- func Options(origurl string, args ...interface{}) (resp *Response, err error)
- func Patch(origurl string, args ...interface{}) (resp *Response, err error)
- func Post(origurl string, args ...interface{}) (resp *Response, err error)
- func PostJson(origurl string, args ...interface{}) (resp *Response, err error)
- func Put(origurl string, args ...interface{}) (resp *Response, err error)
- func PutJson(origurl string, args ...interface{}) (resp *Response, err error)
- func Trace(origurl string, args ...interface{}) (resp *Response, err error)
- func (resp *Response) Content() []byte
- func (resp *Response) Cookies() (cookies []*http.Cookie)
- func (resp *Response) Json(v interface{}) error
- func (resp *Response) JsonPretty() (string, error)
- func (resp *Response) JsonToMap() (map[string]interface{}, error)
- func (resp *Response) PrintToConsole()
- func (resp *Response) ResponseDebug()
- func (resp *Response) SaveFile(filename string) error
- func (resp *Response) Text() string
- type Settings
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug bool = false
View Source
var VERSION string = "0.8"
Functions ¶
func NewRecorder ¶ added in v1.0.1
func NewRecorder() *httptest.ResponseRecorder
func NewRequestForTest ¶ added in v1.0.1
func RegisterCallback ¶ added in v1.0.7
func RegisterCallback(callbacks ...Callback)
Types ¶
type Request ¶
type Request struct { HttpRequest *http.Request Header *http.Header Client *http.Client Debug bool Cookies []*http.Cookie Logger io.Writer Settings Settings Callbacks []Callback }
func (*Request) ClearCookies ¶
func (req *Request) ClearCookies()
func (*Request) ClientSetCookies ¶
func (req *Request) ClientSetCookies()
func (*Request) RegisterCallback ¶ added in v1.0.7
func (*Request) RequestDebug ¶
func (req *Request) RequestDebug()
type Response ¶
func (*Response) JsonPretty ¶ added in v1.0.6
func (*Response) PrintToConsole ¶ added in v1.0.6
func (resp *Response) PrintToConsole()
Click to show internal directories.
Click to hide internal directories.