VaRest icon indicating copy to clipboard operation
VaRest copied to clipboard

Body values on POST request

Open AdamCyffka opened this issue 3 years ago • 1 comments

Hey, I'm trying to add body params to my login route, it's working on postman, but has you can see on the log, weird characters are sent like '%40' instead of 'at'. Idk if the problem is this, or my code is wrong. Thanks ;)

image

Capture d’écran 2022-09-16 181303 2

LogVaRest: UVaRestRequestJSON::ProcessRequest(372): Request (urlencoded): POST https://localhost:1666/authentication?email=test%40gmail.com&password=Test123%40&strategy=local (check bExtendedLog for additional data)
LogVaRest: Response (401): 
JSON(
{"name":"NotAuthenticated","message":"No account with this email","code":401,"className":"not-authenticated","errors":{}}
)JSON

AdamCyffka avatar Sep 16 '22 16:09 AdamCyffka

That is the post method you have chosen, which is a x-www-url-encoded post object. Change it to JSON and it will put any fields you add as a json object in the post body.

kardall avatar Nov 04 '22 18:11 kardall