Documentation ¶
Index ¶
- func IsRESTError(err error) bool
- type Client
- type Config
- type Request
- func (r *Request) Body(contentType string, value interface{}) *Request
- func (r *Request) Data(value interface{}) *Request
- func (r *Request) Do(ctx context.Context) error
- func (r *Request) File(name string, file interface{}) *Request
- func (r *Request) Form(name string, values ...interface{}) *Request
- func (r *Request) Header(name string, values ...interface{}) *Request
- func (r *Request) Meta(value *map[string]string) *Request
- func (r *Request) Path(name string, value interface{}) *Request
- func (r *Request) Query(name string, values ...interface{}) *Request
- type RequestExecutor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRESTError ¶
IsRESTError checks if an error is generated from this package.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements builder pattern for http client.
type Config ¶
type Config struct { // Scheme is http scheme. It can be "http" or "https". Scheme string // Host must be a host string, a host:port or a URL to a server. Host string // Executor is used to execute http requests. // If it is empty, http.DefaultClient is used. Executor RequestExecutor }
Config is rest client config.
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request describes a http request.
Click to show internal directories.
Click to hide internal directories.