#1 Re: mORMot 1 » Consuming a java rest api with basic authentication » 2017-02-02 16:10:43

Now, with the authentication header, it works, thanks.
But now I would need to deserialize the returned json to an object.
Starting with these lines of the above so post:
t := _Obj(['score',1337,'playerName','Sean Plott','cheatMode',False]);
i've tried to figure out how to prepare the variant to be property deserialized but all i have found are examples in which a json is prepared, none of the opposite process.
May you point me to the correct page in the doc ?
many thanks again
nicola

#3 mORMot 1 » Consuming a java rest api with basic authentication » 2017-02-01 15:50:29

nicofari64
Replies: 4

Hi

I am trying to modify a legacy D7 application to consume a java rest api.
Following this (http://stackoverflow.com/questions/2207 … 6#22078306) I stumbled upon mORMot, and downloaded the latest (unstable) version.
In my case, though, this code does not work since my service requires (basic) authentication.
I have tried including the credentials in the url (eg http://username:password@servername:port/api/v1/myservice) but with no success.
Is this kind of url supported ? If so is anywhere an example ?
thanks a lot in advance
bye
NIcola

Board footer

Powered by FluxBB