diff --git a/README.MD b/README.MD index c4a2674..e2017d6 100644 --- a/README.MD +++ b/README.MD @@ -1,4 +1,4 @@ -# simpleRequest -- +# simpleRequest ## 说明 [simpleRequest](www.github.com/dorlolo/simpleRequest) 是基于golang原生http库的封装,适合用来对第三方接口进行快速地对接和开发。 它具备以下特点: @@ -118,7 +118,7 @@ r.Body().Set("beginDate", "2022-03-01").Set("endDate", "2022-03-03") #### map赋值 ```go -bodyBulid := map[string]interface{ +bodyBulid := map[string]interface{}{ "beginDate":"2022-03-01", "endDate":"2022-03-03", } diff --git a/test/simpleRequest_test.go b/test/simpleRequest_test.go index 2f5ae97..342905d 100644 --- a/test/simpleRequest_test.go +++ b/test/simpleRequest_test.go @@ -28,6 +28,10 @@ func TestRequest(t *testing.T) { pamarsBulid := make(map[string]interface{}) pamarsBulid["passwd"] = "123456" pamarsBulid["action"] = "login" + + paramsBuild2 := map[string]interface{}{ + "passwd": "123456", + } r.QueryParams().Sets(pamarsBulid) //--添加body