Documentation ¶ Index ¶ func GetRequest(ctx context.Context, client *http.Client, urlStr string) (*http.Response, error) func PostRequest(ctx context.Context, client *http.Client, urlStr string, body io.Reader, ...) (*http.Response, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GetRequest ¶ func GetRequest(ctx context.Context, client *http.Client, urlStr string) (*http.Response, error) GetRequest 封装了HTTP GET请求的逻辑。 func PostRequest ¶ func PostRequest(ctx context.Context, client *http.Client, urlStr string, body io.Reader, headers map[string]string) ( *http.Response, error) PostRequest 封装了HTTP POST请求的逻辑。 Types ¶ This section is empty. Source Files ¶ View all Source files httpx.go Click to show internal directories. Click to hide internal directories.