Ккк 09.11.2012 7:12 пользователь "waldo kitty" <wkitt...@windstream.net> написал:
> On 11/8/2012 17:11, Michael Van Canneyt wrote: > >> >> >> 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 ? >> > > mainly because the data is better gathered from the other site with > REST... no need to screenscrape from there or have to deal with a lack of > data because the 1st site hasn't gathered it ;) > > 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. >> > > 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... > ______________________________**_________________ > fpc-pascal maillist - > fpc-pascal@lists.freepascal.**org<fpc-pascal@lists.freepascal.org> > http://lists.freepascal.org/**mailman/listinfo/fpc-pascal<http://lists.freepascal.org/mailman/listinfo/fpc-pascal> >
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal