Re: [eclipse-clp-users] Unclear how to make http calls

From: Joachim Schimpf <jschimpf_at_...311...>
Date: Wed, 4 Aug 2021 22:36:09 +0100
Hi Jeshan,

You are right, this doesn't work.  The library is old and unmaintained
and doesn't seem to cope with modern headers in the http response.
The underlying socket functionality is fine though.

Until someone finds the time to update the library, please use
other ways of interfacing with ECLiPSe.

Regards,
Joachim


On 03/08/2021 19:58, Jeshan Babooa via ECLiPSe-CLP-Users wrote:
> Hello,
> I'm trying to hit some simple http endpoint but to no avail.
> What's the right way to do so?
> I've tried the following:
> lib(http).
> http_open("http://127.0.0.1:12345 <http://127.0.0.1:12345/aceql>", R). (this 
> returns No)
> 
> http_client("GET", "http://127.0.0.1:7379/GET/hello 
> <http://127.0.0.1:7379/GET/hello>", "", [], S, P, R). (this works fine in 
> Chrome/Curl but returns S= error(400, "Bad Request ") and does not populate the 
> response)
> 
> I also tried the sockets library but that didn't work neither.
> 
> I also saw this very old thread with the same issue but it was never answered:
> https://sourceforge.net/p/eclipse-clp/mailman/eclipse-clp-users/thread/1170255106.45c0ad02b43df%40imp.free.fr/#msg19014682 
> <https://sourceforge.net/p/eclipse-clp/mailman/eclipse-clp-users/thread/1170255106.45c0ad02b43df%40imp.free.fr/#msg19014682>
> 
> Jeshan
Received on Wed Aug 04 2021 - 21:36:28 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:21 CEST