[fpc-pascal] secure REST client?

Michael Van Canneyt michael at freepascal.org
Fri Nov 9 08:26:21 CET 2012

On Thu, 8 Nov 2012, waldo kitty wrote:

>>> "normal" login on an existing non-REST site and then there's a new method 
>>> of
>>> login on the REST site... i haven't been able to figure out how to convert 
>>> my
>>> fpweb client so that it properly logs in and retains the login so that
>>> subsequent queries will work...
>> I have done this in several projects using fpweb (specifically 
>> fphttpclient).
>> Usually it is simply a matter of retaining some cookies.
> you should recall my recent foray into using that code... i had asked about 
> persistent connections because mine weren't completing until i included 
> headers to state the connection was to be closed...
>> if you give more details, maybe I can offer more help ?
> i'm not sure what to give... i have no clue how to gather cookie data and 
> send it back based on the existing example(s) that i've seen :(
> i do know that i was unable to use the REST site's sample wget cookie stuff 
> make requests to the "normal" login site... i don't know how to state that 
> properly since i'm not sure how either site is really working in this 
> aspect... i only know that the cookie stuff apparently didn't work as 
> described by simply changing the site address from one to the other...

Without more details, it is hard to give advice. 
I can only say that I do something similar to what you describe with fphttpclient.
If the persistent connection is a problem, you can try synapses httpsend class.


More information about the fpc-pascal mailing list