Documentation ¶
Index ¶
- func Delete(ctx context.Context, url string, param map[string]interface{}, ...) error
- func Get(ctx context.Context, url string, result interface{}, opts ...Option) error
- func Post(ctx context.Context, url string, param map[string]interface{}, ...) error
- func Put(ctx context.Context, url string, param map[string]interface{}, ...) error
- type IHttp
- type ILogger
- type Method
- type Option
- func WithDeleteURIFlag(flag bool) Option
- func WithHeader(headers map[string]string) Option
- func WithLog(log ILogger) Option
- func WithMethod(method Method) Option
- func WithParam(params map[string]interface{}) Option
- func WithPreDeal(preDeal func(r *Parameter) error) Option
- func WithResponse(response *nethttp.Response) Option
- func WithTLSClientConfig(tLSClientConfig *tls.Config) Option
- func WithTimeout(timeout time.Duration) Option
- func WithUrl(url string) Option
- type Parameter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IHttp ¶
type IHttp interface { // Get get Get(ctx context.Context, url string, result interface{}, opts ...Option) error // Post post Post(ctx context.Context, url string, param map[string]interface{}, result interface{}, opts ...Option) error // Put put Put(ctx context.Context, url string, param map[string]interface{}, result interface{}, opts ...Option) error // Delete delete Delete(ctx context.Context, url string, param map[string]interface{}, result interface{}, opts ...Option) error }
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithDeleteURIFlag ¶
func WithHeader ¶
func WithMethod ¶
func WithPreDeal ¶
func WithResponse ¶
func WithTLSClientConfig ¶
func WithTimeout ¶
Click to show internal directories.
Click to hide internal directories.