TomEd 0 Posted October 3, 2023 I'm trying to translate the following CURL command to the REST debugger: curl -X POST "https://api.sensorpush.com/api/v1/oauth/authorize" -H "accept: application/json" -H "Content-Type: application/json" -d @- <<BODY { "email": "<email>", "password": "<password>" } BODY The PDF attached shows the result. I expect the REST omission of -H "accept: application/json" is the problem but I'm not sure where to include it in the REST debugger, but there may be other issues. Appreciate any insights... REST_Debug.pdf Share this post Link to post
Uwe Raabe 2057 Posted October 3, 2023 The Custom Body content doesn't look very JSON like. Try adding the brackets. Share this post Link to post
Kas Ob. 121 Posted October 3, 2023 56 minutes ago, Uwe Raabe said: Try adding the brackets. @TomEd And the coma, in other words, the body should be fully validated JSON format. Share this post Link to post
Geoffrey Smith 45 Posted October 4, 2023 Just an slightly related aside. You can use ChatGPT to convert a curl command to delphi code. It is handy because a lot of REST api documentation may have a curl command for a call, but no Delphi version. 2 Share this post Link to post