Documentation ¶
Index ¶
- type Calling
- func Delete(url string, otherParams ...interface{}) (*Calling, error)
- func DoMethod(method Method, url string, otherParams ...interface{}) (*Calling, error)
- func Get(url string, otherParams ...interface{}) (*Calling, error)
- func New(url ...string) *Calling
- func Post(url string, otherParams ...interface{}) (*Calling, error)
- func Put(url string, otherParams ...interface{}) (*Calling, error)
- func (c *Calling) Body() io.Reader
- func (c *Calling) Client() *http.Client
- func (c *Calling) Context() context.Context
- func (c *Calling) Cookies() []*http.Cookie
- func (c *Calling) Do(ctx ...context.Context) error
- func (c *Calling) GetRespBody() ([]byte, error)
- func (c *Calling) GetRespBodyString() (string, error)
- func (c *Calling) GetRespCookies() []*http.Cookie
- func (c *Calling) GetRespHeader() http.Header
- func (c *Calling) GetRespStatusCode() int
- func (c *Calling) GetRespStatusIsOK() bool
- func (c *Calling) GetResponse() *http.Response
- func (c *Calling) Header() http.Header
- func (c *Calling) HeaderByKey(key string) string
- func (c *Calling) Method() Method
- func (c *Calling) Option() *Option
- func (c *Calling) ReDo(ctx ...context.Context) error
- func (c *Calling) Request() *http.Request
- func (c *Calling) TimeExpend() time.Duration
- func (c *Calling) Url() *url.URL
- func (c *Calling) WithBody(body interface{}) *Calling
- func (c *Calling) WithClient(client *http.Client) *Calling
- func (c *Calling) WithContext(ctx context.Context) *Calling
- func (c *Calling) WithCookie(cookie *http.Cookie) *Calling
- func (c *Calling) WithHeader(headers ...interface{}) *Calling
- func (c *Calling) WithMethod(method Method) *Calling
- func (c *Calling) WithOption(opt *Option) *Calling
- func (c *Calling) WithRequest(request *http.Request) *Calling
- func (c *Calling) WithUrl(u interface{}) *Calling
- type Error
- type Method
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calling ¶
type Calling struct {
// contains filtered or unexported fields
}
func DoMethod ¶
*
- otherParams type: []byte: body | string: body | io.Reader: body | context.Context: | http.Header | Option
func (*Calling) GetRespBody ¶
func (*Calling) GetRespBodyString ¶
func (*Calling) GetRespCookies ¶
func (*Calling) GetRespHeader ¶
func (*Calling) GetRespStatusCode ¶
func (*Calling) GetRespStatusIsOK ¶
func (*Calling) GetResponse ¶
func (*Calling) HeaderByKey ¶
func (*Calling) TimeExpend ¶
func (*Calling) WithHeader ¶
func (*Calling) WithMethod ¶
func (*Calling) WithOption ¶
Click to show internal directories.
Click to hide internal directories.