Documentation ¶
Index ¶
- type Body
- type Request
- func (r *Request) Accept(cts string) *Request
- func (r *Request) BasicAuth(username, password string) *Request
- func (r *Request) Bearer(token string) *Request
- func (r *Request) Body(b Body) *Request
- func (r *Request) BodyData(data []byte) *Request
- func (r *Request) BodyJSON(v interface{}) *Request
- func (r *Request) Build(ctx context.Context) (*http.Request, error)
- func (r *Request) Client(client *http.Client) *Request
- func (r *Request) ContentType(ct string) *Request
- func (r *Request) ContentTypeJSON() *Request
- func (r *Request) Delete() *Request
- func (r *Request) Execute(ctx context.Context, afterDo func(error) error, ...) error
- func (r *Request) Get() *Request
- func (r *Request) Header(key string, values ...string) *Request
- func (r *Request) ID(ID string) *Request
- func (r *Request) Method(method string) *Request
- func (r *Request) Param(key string, values ...string) *Request
- func (r *Request) Path(path string) *Request
- func (r *Request) Pathf(format string, a ...interface{}) *Request
- func (r *Request) Post() *Request
- func (r *Request) Put() *Request
- func (r *Request) UserAgent(ua string) *Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Body ¶
type Body func() (io.ReadCloser, error)
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func (*Request) ContentType ¶
func (*Request) ContentTypeJSON ¶
Click to show internal directories.
Click to hide internal directories.