Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread TRESTClient and ResponseDataSetAdaptor
Fri, May 8 2015 3:13 AMPermanent Link

Anthony

Has anyone used the Delphi TRESTClient and ResponseDataSetAdaptor components?

I'm looking at creating a mobile app and have got a prototype working demo working using the dataset url from EWB. I can read data and display in a listview. In production the EWB dataset doesn't store the authentication details this is passed by a login screen of the application, I have a similar setup in an EWB application. I have tried various ways to pass the authentication from the TRESTClient to EWB but have been unsuccessful and have not been able to find any documentation on this, i'e tried the Params list of both RESTClient and RESTRequest and also looked at the authentication components.

Secondly if anyone has used these components what is the best was to post updates back to the database via EWB can this be done?

Many thanks
Fri, May 8 2015 3:57 AMPermanent Link

Matthew Jones

Anthony wrote:

> I have
> tried various ways to pass the authentication from the TRESTClient to
> EWB but have been unsuccessful and have not been able to find any
> documentation on this, i'e tried the Params list of both RESTClient
> and RESTRequest and also looked at the authentication components.

Can't help on the specifics, but I can suggest how to find out what is
what. First, use Chrome as the debugging tools are very good, and will
allow you to see all the calls with headers and responses. You can see
what the sample is doing, and what you are doing.

Second, I use the Chrome add-in called "PostMan" which allows me to set
up calls that I can then repeatedly call. It allows you to experiment
with headers and the like.

So I find that if something is not working, I can first find out what
is actually happening, and then if it is working on one system and not
another, can experiment to see what is making it different in a system
designed for experimenting, instead of tweaking code and rebuilding all
the time. Obviously you end up in the code, but these tools make it a
lot faster to see what is happening under the hood.

(I think IE 11 has good tools now too, but not quite as good as Chrome)


--

Matthew Jones
Fri, May 8 2015 5:16 AMPermanent Link

Mark Brooks

Slikware

Avatar

Anthony wrote:

> I have
> tried various ways to pass the authentication from the TRESTClient to
> EWB but have been unsuccessful and have not been able to find any
> documentation on this, i'e tried the Params list of both RESTClient
> and RESTRequest and also looked at the authentication components.

Per Matthew, I would suggest a good debugger. If you're on a Mac then PAW is fantastic. It has helped me see the wood through the trees on numerous occasions.
Fri, May 8 2015 9:21 AMPermanent Link

Anthony

Thanks for your replies, I have also found Fiddler which looks like it may also show a Delphi App traffic, will take a look at the traffic and hopefully have a better idea of why authentication its not working.

Does anyone have suggestions on the best way to post updates back to the database?
Image