#1 Re: mORMot 1 » Need help for post a json in a Body » 2020-02-27 07:59:54

Yes I know, it is correct. With postman.exe have i get a correct answer with the json without the last comma. I need only a simple example, how i can send a POST, with the right type and charset to send the json. In the hole examples of mORMot i didn't find a example for this situation.

#2 mORMot 1 » Need help for post a json in a Body » 2020-02-26 16:21:24

Xantharim
Replies: 7

Hi,
i hope, that it is ok, that i ask this question.

I have a problem. I try to send a JSON in a Body with TRestClient, TRestRequest, TRestResponse and it doesn't work after many day's with try and error.
With the free Rest-Debugger it doesn't work too. But I can send it with Postman.exe.
So i found mORMot Framwork. But it seem's complicated.

The API Description https://github.com/blaulichtSMS/docs/bl … _api_v1.md write:

Encoding: UTF-8
Base-Url: https://api.blaulichtsms.net/blaulicht
Ressource: /api/alarm/v1/scenario/config/list
Content-Typ: application/json
JSON:
{
    "username" : "myUser",
    "password" : "mySuperSecretPwd",
    "customerIds" : ["100027"]
}

cumstomerIds is a List of Strings!
Have anyone a simple Example for me to realise it? The Response is a JSON too.

Georg

I use Embarcadero Radstudio Enterprise 10.3 Rio, the mORNot Framework i full functionally installed... :-)

Board footer

Powered by FluxBB