From 6052845881867a14f99d78f2a74460a1cc30eec6 Mon Sep 17 00:00:00 2001 From: dorlolo <428192774@qq.com> Date: Thu, 17 Mar 2022 16:06:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0md=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.MD | 4 ++-- test/simpleRequest_test.go | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) 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