On Thu, 8 Nov 2012, waldo kitty wrote:
i'm looking at creating a REST web application client... nothing fancy...
command line oriented... fire it up, it logs into the website and performs
the REST queries saving the output to named files...
i have no clue where to start looking in the FPC documentation or any
existing libraries... i have toyed with something using fpweb that would pull
some pages from a site for scraping but that idea is no longer being
considered...
Why not ?
firstly i'm not sure how to go about doing the login ops with cookies and
such... the site gives some assistance and examples for using wget and curl
but i think i'd prefer to handle this in my client... currently there's a
"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.
if you give more details, maybe I can offer more help ?
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal