does get-url support https?

For the Compleat Fan
Locked
scusack
Posts: 1
Joined: Thu Apr 27, 2006 1:28 pm

does get-url support https?

Post by scusack »

Hi all,

I have been trying ;

(get-url "http://www.foo...bar.com") which works beautifully but;

(get-url "https://www.foo...bar.com/") just seems to spin forever without returning anything. I usually have to kill newLisp (on winXP) as it stops responding.

I haven't tried it on my linux box yet, does anybody know if get-url supports https out of the box, I couldn't find anything in the help doco.

Regards, Simon Cusack.

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

get-url supports the HTTP GET protocol.

I do not think that it does support the secure protocol.
Hans-Peter

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

No SSL protocol support yet but you can specify a timeout in milli seconds:

Code: Select all

> (get-url "https://www.foo...bar.com/") 2000)
"ERR: timeout"
> 
because https is not implemented, newLISP will still try port 80, but you can force it to the SSL default of 443:

Code: Select all

> (get-url "https://www.foo...bar.com:443" 2000)
"ERR: invalid response from server"
> 
now it will return right away, but again these are all games because https:// support is not implemented.

As a work around use the newLISP 'exec' funtion with the 'curl' UNIX utility:

Code: Select all

(exec "curl https:// ......")
This will return all standart out from the curl utility in a list of strings to newLISP.

Lutz

itistoday
Posts: 429
Joined: Sun Dec 02, 2007 5:10 pm
Contact:

Re:

Post by itistoday »

Lutz wrote:No SSL protocol support yet
Any plans for this? Would be rather useful if get/put/post-url functions supported this.
Get your Objective newLISP groove on.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: does get-url support https?

Post by Lutz »

Most Unix systems have libcurl on it. It is possible to write a module to do SSL via https and other stuff. Until such a module exists you could use the method, Cormullion uses to post to blogspot.com:

http://newlisper.blogspot.com/2007/06/p ... sp_16.html

Then there is also the Amazon module to communicate with there ec2 data services via https:

http://www.newlisp.org/modules/various/ ... p.src.html

The module assumes you already have keys.

itistoday
Posts: 429
Joined: Sun Dec 02, 2007 5:10 pm
Contact:

Re: does get-url support https?

Post by itistoday »

Yeah I'm currently using 'curl' right now, was just wondering if there were any plans for building this into newlisp.
Get your Objective newLISP groove on.

Locked