Documentation
¶
Index ¶
- func Delete[T any](c *Client, ctx context.Context, path string, opts ...Opt) (*T, error)
- func Get[T any](c *Client, ctx context.Context, path string, opts ...Opt) (*T, error)
- func GetHeaderMap(header string) map[string]string
- func Post[T any](c *Client, ctx context.Context, path string, body any, opts ...Opt) (*T, error)
- func PostURL[T any](ctx context.Context, rawURL string, body any, opts ...Opt) (*T, error)
- func Put[T any](c *Client, ctx context.Context, path string, body any, opts ...Opt) (*T, error)
- type Client
- type Ctx
- type Header
- type Opt
- type Query
- type ReqOpt
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHeaderMap ¶
GetHeaderMap 解析 header 字符串为 map 格式: "Key1=Value1\nKey2=Value2"
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client HTTP 客户端
Click to show internal directories.
Click to hide internal directories.