Open collimarco opened 1 year ago
I cannot match an array in the JSON request body.
gock.New("https://example.com"). Post("/api/v1/projects/PROJECT_ID/notifications"). MatchType("json"). JSON(map[string]interface{}{"body": "Hello user1", "uids": []string{"user1"}}). Reply(201)
It seems that JSON matching works only with type map[string]string but not with more complex objects (like array fields).
map[string]string
I always get: gock: cannot match any request.
gock: cannot match any request
Any suggestions?
Thank you
I cannot match an array in the JSON request body.
It seems that JSON matching works only with type
map[string]string
but not with more complex objects (like array fields).I always get:
gock: cannot match any request
.Any suggestions?
Thank you