优化参数名

This commit is contained in:
Yun
2024-01-12 21:06:13 +08:00
parent 5159d5d258
commit 503e4503ab
4 changed files with 30 additions and 30 deletions
+4 -4
View File
@@ -10,8 +10,8 @@ import (
func TestGet(t *testing.T) {
resp, code, err := NewCurlx().Send(context.Background(),
SetUrl("https://www.baidu.com"),
SetMethod(MethodGet),
SetParamsUrl("https://www.baidu.com"),
SetParamsMethod(MethodGet),
)
t.Log(resp, code, err)
@@ -39,12 +39,12 @@ func TestForm(t *testing.T) {
p := ClientParams{
Url: "http://tech-dev.sealmoo.com/api/material/upload",
Method: "POST",
Params: s,
Body: s,
Headers: map[string]interface{}{
"Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOjAsImNsaWVudF9pZCI6MCwidXNlcl9pZCI6MSwiZXhwIjoxNzAxMzk3NzkxfQ.9_uJ6y8I4JZTwgSenwHC_01nddLuI4zmgpyPhn5M6j8",
},
ContentType: ContentTypeForm,
}
resp, code, err := NewCurlx().Send(context.Background(), SetAll(p))
resp, code, err := NewCurlx().Send(context.Background(), SetParamsAll(p))
fmt.Println(resp, code, err)
}