From 7bf34d4061b5db2e95c62f53622c41271c001fe8 Mon Sep 17 00:00:00 2001 From: dorlolo <428192774@qq.com> Date: Thu, 24 Mar 2022 23:18:49 +0800 Subject: [PATCH] =?UTF-8?q?=C3=A6=C2=9B=E5=AE=8C=E6=88=90TestAuthorization?= =?UTF-8?q?=E6=B5=8B=C3=A8=E5=8A=9F=E5=8A=9F=E8=83=BD=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/simpleRequest_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/simpleRequest_test.go b/test/simpleRequest_test.go index 5286e1d..8e131a7 100644 --- a/test/simpleRequest_test.go +++ b/test/simpleRequest_test.go @@ -66,3 +66,15 @@ func TestAuth_fotmData(t *testing.T) { data, _ := req.Post(URL) t.Log(string(data)) } + +//测试令牌验证 +func TestAuthorization(t *testing.T) { + req := simpleRequest.NewRequest() + req.Authorization().Bearer("19f0591e-fab1-4447-90c3-1c60aef78fbd") + req.Body().Set("prjnumber", "3205072020100901A01000") + req.Body().Set("date", "20220324") + data, err := req.Post("") + t.Log(string(data)) + t.Log(err) + +}