ufna / VaRest

REST API plugin for Unreal Engine 4 - we love restfull backend and JSON communications!
https://www.unrealengine.com/marketplace/en-US/product/varest-plugin
MIT License
1.07k stars 292 forks source link

Body values on POST request #389

Closed AdamCyffka closed 4 months ago

AdamCyffka commented 2 years ago

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
kardall commented 1 year ago

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.