Documentation ¶
Overview ¶
Package client - Http Client
Index ¶
- Variables
- type Context
- func (c *Context) Get(ctx context.Context, args ...string) (*resty.Response, error)
- func (c *Context) Post(ctx context.Context, body interface{}, args ...string) (*resty.Response, error)
- func (c *Context) Put(ctx context.Context, body interface{}, args ...string) (*resty.Response, error)
- func (c *Context) R() *resty.Request
- func (c *Context) Reload(ctx context.Context) error
- func (c *Context) Retire(ctx context.Context) error
- func (c *Context) Schedule(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrArgument indicates a argument error ErrArgument = fmt.Errorf("client: unexcept argument") // ErrConfigure indicates a config error ErrConfigure = fmt.Errorf("client: unexcept configure") )
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { *base.TaskBase // contains filtered or unexported fields }
Context of client
func NewContext ¶
NewContext return a new Context of http client
func (*Context) Post ¶
func (c *Context) Post(ctx context.Context, body interface{}, args ...string) (*resty.Response, error)
Post resource by http request
func (*Context) Put ¶
func (c *Context) Put(ctx context.Context, body interface{}, args ...string) (*resty.Response, error)
Put resource by http request
Click to show internal directories.
Click to hide internal directories.