Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnexpectedStatusCode = errors.New("unexpected status code").WithCode("UNEXPECTED_STATUS_CODE")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Patch(ctx context.Context, request *Request, opts ...RequestOption) (rst Result, err error)
Put(ctx context.Context, request *Request, opts ...RequestOption) (rst Result, err error)
Post(ctx context.Context, request *Request, opts ...RequestOption) (rst Result, err error)
PostForm(ctx context.Context, request *Request, opts ...RequestOption) (rst Result, err error)
Delete(ctx context.Context, request *Request, opts ...RequestOption) (rst Result, err error)
Get(ctx context.Context, request *Request, opts ...RequestOption) (rst Result, err error)
}
type Headers ¶
Headers is a map containing the relation key=value of the headers used on the http rest request.
type PathParams ¶
PathParams is a map containing the relation key=value of the path params used on the http rest request. It will be used to replace values given in Path parameter.
type QueryParams ¶
QueryParams is a map containing the relation key=value of the query params used on the http rest request.
type Request ¶
type Request struct {
Host string
Path string
Body []byte
Headers Headers
QueryParams QueryParams
PathParams PathParams
// contains filtered or unexported fields
}
Request are the params used to build a new http rest request.
type RequestOption ¶
type RequestOption func(*Request)
func WithAcceptStatusCode ¶
func WithAcceptStatusCode(code int) RequestOption
Source Files
¶
Click to show internal directories.
Click to hide internal directories.