Documentation
¶
Index ¶
- func BuildClient(u, method string, q map[string]any, a ...any) (res *http.Client, req *http.Request, err error)
- func Get(u string, q map[string]any, a ...any) (res *http.Response, err error)
- func GetString(u string, q map[string]any, a ...any) (r string, code int, err error)
- func GetToJsonAny[T any](u string, q map[string]any, a ...any) (r T, code int, err error)
- func Post(u string, types int, form map[string]any, a ...any) (res *http.Response, err error)
- func PostClient(u string, types int, form map[string]any, a ...any) (cli *http.Client, req *http.Request, err error)
- func PostFormDataString(u string, form map[string]any, a ...any) (r string, code int, err error)
- func PostToJsonAny[T any](u string, types int, form map[string]any, a ...any) (r T, code int, err error)
- func PostWwwString(u string, form map[string]any, a ...any) (r string, code int, err error)
- func RequestToJSON[T any](client *http.Client, req *http.Request, a ...any) (res *http.Response, r T, err error)
- func SetArgs(cli *http.Client, req *http.Request, a ...any)
- func SetBody(req *http.Request, types int, form map[string]any) (err error)
- func SetUrl(u string, req *http.Request) error
- type BodyBuffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildClient ¶
func GetToJsonAny ¶
func PostClient ¶
func PostFormDataString ¶
func PostToJsonAny ¶
func PostWwwString ¶
func RequestToJSON ¶
Types ¶
type BodyBuffer ¶
type BodyBuffer struct { Offset int Data *[]byte ReadFn func([]byte) (int, error) CloseFn func() error }
func NewBodyBuffer ¶
func NewBodyBuffer(byt *[]byte, readFn ...func(*BodyBuffer, []byte) (int, error)) *BodyBuffer
func (*BodyBuffer) Close ¶
func (b *BodyBuffer) Close() error
Click to show internal directories.
Click to hide internal directories.