Re: library(http/http_client) with https URLs

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 07/18/2013 03:11 PM, Michael Hendricks wrote:
> On Thu, Jul 18, 2013 at 6:59 AM, Jan Wielemaker <[email protected]
> <mailto:[email protected]>> wrote:
>
>     That might make sense.  For your particular problem though, using
>     library(process) also merely gets you a stream, which is exactly
>     what http_open/3 gives you.  I don't really get the point, unless
>     there is some feature that http_open/3 doesn't do.  It should be
>     happy to do HTTP, HTTPS, redirects, authentication and proxies.
>
>
> For GET requests, http_open/3 is quite nice.  I use it regularly.
>   However, after a couple hours investigating, I still haven't figured
> out how to make it work with a POST request.  I'm probably missing
> something obvious.
>
> After about two minutes experimentation, I successfully sent a POST
> request with process_create/3 on top of /usr/bin/curl

Assuming you have the data you want to post in Prolog, it is quite
likely that http_open/3 can do a better job.  Just, what is your data
and in what form do you want it posted?  Possibly, the example in
http://www.swi-prolog.org/pldoc/man?predicate=http_post_data/3 can
help you?
	
	--- Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.