not matching GET request
giulianozor opened this issue · 0 comments
giulianozor commented
Hi,
I have a request that I can not match ...
versions
gock v1.1.2
go 1.17.3
code:
res := models.Test{
ID: 1
}
params := map[string]string{"id": "1"}
gock.New("test:3000").Get("/api/v1/test/").MatchParams(params).Reply(http.StatusOK).JSON(res)
gock.Observe(gock.DumpRequest)
defer gock.Off()
Output```
GET /api/v1/test/?id=1 HTTP/1.1
Host: test:3000
User-Agent: Go-http-client/1.1
Authorization: Bearer a
Content-Type: application/json
Accept-Encoding: gzip
Matches: false
Any idea about what I am missing ?
Other mocks with similar data are working fine...
thanks