Documentation ¶
Index ¶
- type ClientBuilder
- type Option
- type OptionFunc
- type RequestInterfaceBuilder
- type ResponseBuilder
- func (c *ResponseBuilder) Byte() []byte
- func (c *ResponseBuilder) Code() int
- func (c *ResponseBuilder) Cookie() string
- func (c *ResponseBuilder) Debug() *ResponseBuilder
- func (c *ResponseBuilder) DebugString() string
- func (c *ResponseBuilder) Gjson() gjson.Result
- func (c *ResponseBuilder) Html() *goquery.Document
- func (c *ResponseBuilder) HtmlGbk() *goquery.Document
- func (c *ResponseBuilder) Json(v any) error
- func (c *ResponseBuilder) Status() string
- func (c *ResponseBuilder) Text() string
- func (c *ResponseBuilder) TextGbk() string
- type ResponseInterfaceBuilder
- func Delete(url string, options ...Option) ResponseInterfaceBuilder
- func Get(url string, options ...Option) ResponseInterfaceBuilder
- func Patch(url string, options ...Option) ResponseInterfaceBuilder
- func Post(url string, options ...Option) ResponseInterfaceBuilder
- func Put(url string, options ...Option) ResponseInterfaceBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientBuilder ¶
func BuilderDefault ¶ added in v1.2.4
func BuilderDefault(method, url string, options ...Option) (*ClientBuilder, error)
func (*ClientBuilder) NewRequestClient ¶ added in v1.4.7
func (b *ClientBuilder) NewRequestClient() (*ResponseBuilder, error)
type OptionFunc ¶
type OptionFunc func(*ClientBuilder)
type RequestInterfaceBuilder ¶
type RequestInterfaceBuilder interface {
NewRequestClient() (*ResponseBuilder, error)
}
type ResponseBuilder ¶
type ResponseBuilder struct {
// contains filtered or unexported fields
}
func (*ResponseBuilder) Byte ¶ added in v1.0.7
func (c *ResponseBuilder) Byte() []byte
func (*ResponseBuilder) Code ¶
func (c *ResponseBuilder) Code() int
func (*ResponseBuilder) Cookie ¶ added in v1.0.7
func (c *ResponseBuilder) Cookie() string
func (*ResponseBuilder) Debug ¶
func (c *ResponseBuilder) Debug() *ResponseBuilder
func (*ResponseBuilder) DebugString ¶ added in v1.2.1
func (c *ResponseBuilder) DebugString() string
func (*ResponseBuilder) Gjson ¶
func (c *ResponseBuilder) Gjson() gjson.Result
func (*ResponseBuilder) Html ¶ added in v1.2.9
func (c *ResponseBuilder) Html() *goquery.Document
func (*ResponseBuilder) HtmlGbk ¶ added in v1.3.0
func (c *ResponseBuilder) HtmlGbk() *goquery.Document
func (*ResponseBuilder) Json ¶
func (c *ResponseBuilder) Json(v any) error
func (*ResponseBuilder) Status ¶
func (c *ResponseBuilder) Status() string
func (*ResponseBuilder) Text ¶
func (c *ResponseBuilder) Text() string
func (*ResponseBuilder) TextGbk ¶ added in v1.3.0
func (c *ResponseBuilder) TextGbk() string
type ResponseInterfaceBuilder ¶
type ResponseInterfaceBuilder interface { Code() int Status() string Json(v any) error Text() string TextGbk() string Gjson() gjson.Result Debug() *ResponseBuilder DebugString() string Byte() []byte Cookie() string Html() *goquery.Document HtmlGbk() *goquery.Document }
func Delete ¶
func Delete(url string, options ...Option) ResponseInterfaceBuilder
func Get ¶
func Get(url string, options ...Option) ResponseInterfaceBuilder
func Patch ¶
func Patch(url string, options ...Option) ResponseInterfaceBuilder
func Post ¶
func Post(url string, options ...Option) ResponseInterfaceBuilder
func Put ¶
func Put(url string, options ...Option) ResponseInterfaceBuilder
Click to show internal directories.
Click to hide internal directories.