对接新供应链-唯品尚
This commit is contained in:
parent
0b6b76c708
commit
9e328b469b
@ -8,6 +8,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
@ -268,6 +269,7 @@ func (w *WeiPinShangClient) WPSPost(url string, paramMap map[string]any) (res []
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
//req.Proto = "HTTP/2"
|
||||
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
req.Header.Set("channelType", w.ChannelType)
|
||||
@ -276,13 +278,15 @@ func (w *WeiPinShangClient) WPSPost(url string, paramMap map[string]any) (res []
|
||||
return
|
||||
}
|
||||
req.Header.Set("md5", sign)
|
||||
|
||||
log.Printf("WPSPost req: %+v\n", req)
|
||||
// 创建 HTTP 客户端
|
||||
client := &http.Client{}
|
||||
|
||||
log.Printf("WPSPost client: %+v\n", client)
|
||||
// 发送请求
|
||||
resp, err := client.Do(req)
|
||||
log.Printf("WPSPost resp: %+v\n", resp)
|
||||
if err != nil {
|
||||
log.Printf("发送请求失败: %+v\n", err)
|
||||
return
|
||||
}
|
||||
defer func(Body io.ReadCloser) {
|
||||
|
@ -292,7 +292,7 @@ func TestWeiPinShangClient_GetOrderInfoByThirdNO(t *testing.T) {
|
||||
Key: "f654ea5bde7635c3f46191191e5c4c8e",
|
||||
},
|
||||
args: args{
|
||||
orderNo: "570872619444771455",
|
||||
orderNo: "570853643339733632",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user