[fpc-pascal] A simple HTTP request with FPC standard units

Michael Van Canneyt michael at freepascal.org
Fri Nov 23 23:15:03 CET 2012



On Fri, 23 Nov 2012, Leonardo M. Ramé wrote:

>> You mean probably
>>    s := TFPCustomHTTPClient.Get('http://a_site/a_page');
>> 
>> It could be done, but it will need to create an instance anyway. 
>> Although I suspect such a simple case is a minority.
>> 
>> Michael.
>> _______________________________________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
> Yes, I said this because the original poster wrote he needed the very little code to accomplish this.

I implemented the class methods for all forms of Get/Post/Formpost, so now you can do:

s := TFPCustomHTTPClient.SimpleGet('http://a_site/a_page');

You can't get more simple than that.

Michael.


More information about the fpc-pascal mailing list