- What version of Go and beego are you using (
bee version
)?
| \ | |/ / __ | \ / \ / \ | |/ /| /| / ___/ \| ___| v1.10.0
├── Beego : 1.12.1 ├── GoVersion : go1.13.4 ├── GOOS : windows ├── GOARCH : amd64 ├── NumCPU : 8 ├── GOPATH : D:\Go ├── GOROOT : E:\Go ├── Compiler : gc └── Date : Tuesday, 26 May 2020
- What operating system and processor architecture are you using (
go env
)? set GO111MODULE= set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\XLL\AppData\Local\go-build set GOENV=C:\Users\XLL\AppData\Roaming\go\env set GOEXE=.exe set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GONOPROXY=.corp.example.com set GONOSUMDB=.corp.example.com set GOOS=windows set GOPATH=D:\Go set GOPRIVATE=*.corp.example.com set GOPROXY=https://goproxy.io,direct set GOROOT=E:\Go set GOSUMDB=sum.golang.org set GOTMPDIR= set GOTOOLDIR=E:\Go\pkg\tool\windows_amd64 set GCCGO=gccgo set AR=ar set CC=gcc set CXX=g++ set CGO_ENABLED=1 set GOMOD= set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\XLL\AppData\Local\Temp\go-build130861342=/tmp/go-build -gno-record-gcc-switches
我再使用httplib的Put方法时,通过Param()添加参数,没有效果
req := httplib.Put("http://user:password@192.168.0.10:8080/rest/api/2/user/password/")
req.Param("username", "2222")
返回的response为
&{http://user:password@192.168.0.10:8080/rest/api/2/user/password/ 0xc0000d8000 map[username:[2222]] map[] {false beegoServer 60000000000 60000000000 <nil> <nil> <nil> <nil> false true true 0} 0xc0000d6000 [] []}
{"errorMessages":["无论是 “用户名” 或 “按键” 的查询参数需要提供"],"errors":{}}
但是我在使用Post方式时,Param是可以生效的,是Put方法不支持Param还是我的使用错误,我看文档的描述是这样的 十分期望能得到回复,谢谢