Documentation ¶
Index ¶
- func Get(ctx context.Context, path string, resp any, options ...RequestOption) error
- func MustInit(conf *config.Config, options ...Option)
- func PostJSON(ctx context.Context, path string, req any, resp any, options ...RequestOption) error
- func PostUrlEncodeForm(ctx context.Context, path string, req Former, resp any) error
- func UploadImage(ctx context.Context, path string, form MultiPartForm, resp any, ...) error
- func WithAccessTokenHeader(token string) func(*resty.Request)
- func WithHeaders(headers map[string]string) func(*resty.Request)
- func WithOpenIdQueryParam(openId string) func(*resty.Request)
- func WithQueryParams(params map[string]string) func(*resty.Request)
- type Former
- type MultiPartForm
- type Option
- type RequestOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PostUrlEncodeForm ¶
func UploadImage ¶
func UploadImage(ctx context.Context, path string, form MultiPartForm, resp any, options ...RequestOption) error
func WithAccessTokenHeader ¶
func WithAccessTokenHeader(token string) func(*resty.Request)
func WithHeaders ¶
func WithOpenIdQueryParam ¶
func WithOpenIdQueryParam(openId string) func(*resty.Request)
func WithQueryParams ¶
Types ¶
type MultiPartForm ¶
func NewImageUploadForm ¶
func NewImageUploadForm(filename string, reader io.Reader) MultiPartForm
type RequestOption ¶
type RequestOption func(*resty.Request)
Click to show internal directories.
Click to hide internal directories.