This commit is contained in:
lychang
2026-05-21 03:29:53 +08:00
parent 10905c0acc
commit b8aa531761
4 changed files with 17 additions and 330 deletions

View File

@@ -62,6 +62,7 @@ func (c *HTTPClient) PostJSON(url string, data interface{}, headers map[string]s
// Post 发送POST请求
func (c *HTTPClient) Post(url string, data []byte, contentType string, headers map[string]string) ([]byte, error) {
fmt.Println(string(data))
req, err := http.NewRequest("POST", url, bytes.NewBuffer(data))
if err != nil {
return nil, fmt.Errorf("创建POST请求失败: %v", err)