Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Get(ctx context.Context, url string, opts ...RequestOption) (int, error) Head(ctx context.Context, url string, opts ...RequestOption) (int, error) Post(ctx context.Context, url string, opts ...RequestOption) (int, error) Put(ctx context.Context, url string, opts ...RequestOption) (int, error) Patch(ctx context.Context, url string, opts ...RequestOption) (int, error) Delete(ctx context.Context, url string, opts ...RequestOption) (int, error) Connect(ctx context.Context, url string, opts ...RequestOption) (int, error) Options(ctx context.Context, url string, opts ...RequestOption) (int, error) Trace(ctx context.Context, url string, opts ...RequestOption) (int, error) }
func NewClient ¶
func NewClient(opts ...ClientOption) Client
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
func WithClientHeader ¶
func WithClientHeader(key, value string, isAdding ...bool) ClientOption
WithClientHeader sets the header entries associated with key to the single element value. It replaces any existing values associated with key. If isAdding[0] == true (default is false) then It appends to any existing values associated with key
func WithClientHookFn ¶
func WithClientHookFn(hookFn HookFn) ClientOption
func WithSender ¶
func WithSender(sender Sender) ClientOption
type RequestOption ¶
type RequestOption interface {
// contains filtered or unexported methods
}
func WithBodyProvider ¶
func WithBodyProvider(bProvider body.Provider) RequestOption
func WithHeader ¶
func WithHeader(key, value string, isAdding ...bool) RequestOption
WithHeader sets the header entries associated with key to the single element value. It replaces any existing values associated with key. If isAdding[0] == true (default is false) then It appends to any existing values associated with key
func WithHookFn ¶
func WithHookFn(hookFn HookFn) RequestOption
func WithQuery ¶
func WithQuery(query interface{}) RequestOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.