1. How to Diagnose http_get() Error (Returning -2)
- Posted by euphoric (admin) Dec 04, 2017
- 1486 views
My http_get() call is returning -2 to a particular URL, but not to others. This particular URL is valid (can be reached in a browser), so I'm not sure what the -2 means. Anyone have a clue there?
2. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by jimcbrown (admin) Dec 04, 2017
- 1503 views
My http_get() call is returning -2 to a particular URL, but not to others. This particular URL is valid (can be reached in a browser), so I'm not sure what the -2 means. Anyone have a clue there?
That's ERR_INVALID_PROTOCOL. Are you trying https (which is still unsupported) or maybe using an ftp url? Or maybe you just forgot to include the http: part!
3. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by ghaberek (admin) Dec 04, 2017
- 1514 views
My http_get() call is returning -2 to a particular URL, but not to others. This particular URL is valid (can be reached in a browser), so I'm not sure what the -2 means. Anyone have a clue there?
That's ERR_INVALID_PROTOCOL. Are you trying https (which is still unsupported) or maybe using an ftp url? Or maybe you just forgot to include the http: part!
I'd wager that's the case as well. I recommend using libcurl instead.
-Greg
4. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by euphoric (admin) Dec 04, 2017
- 1508 views
My http_get() call is returning -2 to a particular URL, but not to others. This particular URL is valid (can be reached in a browser), so I'm not sure what the -2 means. Anyone have a clue there?
That's ERR_INVALID_PROTOCOL. Are you trying https (which is still unsupported) or maybe using an ftp url? Or maybe you just forgot to include the http: part!
Ah! Thanks, Jim. I wondered if it might be the https. Yes, trying to use https.
Hey! Where did you find that error description?
And when is https going to be supported? Sooner rather than later? X)
5. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by euphoric (admin) Dec 04, 2017
- 1506 views
I'd wager that's the case as well. I recommend using libcurl instead.
Noice! Thanks, Greg!
6. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by ghaberek (admin) Dec 05, 2017
- 1446 views
And when is https going to be supported? Sooner rather than later? X)
Since I'm in a wagering mood, I'll say "whenever we get around to shoehorning libCURL into Euphoria."
Encryption is hard and not something that should be (safely) re-implemented from scratch.
I'd really like to see something like libCURL supplant the http_get/post methods altogether.
-Greg
7. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by euphoric (admin) Dec 05, 2017
- 1463 views
I'd really like to see something like libCURL supplant the http_get/post methods altogether.
Well, how about we inject some cash into the Euphoria development economy? Who do I need to pay to get this done?
8. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by jimcbrown (admin) Dec 05, 2017
- 1391 views
That's ERR_INVALID_PROTOCOL. Are you trying https (which is still unsupported) or maybe using an ftp url? Or maybe you just forgot to include the http: part!
Hey! Where did you find that error description?
I couldn't find any docs on it, I had to do a grep and eventually found http://scm.openeuphoria.org/hg/euphoria/file/ba0fec61913e/include/std/net/http.e#l39
And when is https going to be supported? Sooner rather than later? X)
Patches will be accepted.
9. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by euphoric (admin) Dec 05, 2017
- 1401 views
Patches will be accepted.
Unfortunately, I don't have the skills, but I do have some incentives.
10. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by jmduro Dec 06, 2017
- 1379 views
I'd really like to see something like libCURL supplant the http_get/post methods altogether.
Well, how about we inject some cash into the Euphoria development economy? Who do I need to pay to get this done?
All of this is already working in Eu3 Standard Library and Eu4 Standard Library, and it is free! You get libcurl, wininet and winhttp which all support HTTPS. You get even all Win32 errors description and it is ready for 64 bits too.
regards
Jean-Marc
11. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by euphoric (admin) Dec 06, 2017
- 1373 views
I'd really like to see something like libCURL supplant the http_get/post methods altogether.
Well, how about we inject some cash into the Euphoria development economy? Who do I need to pay to get this done?
All of this is already working in Eu3 Standard Library and Eu4 Standard Library, and it is free! You get libcurl, wininet and winhttp which all support HTTPS. You get even all Win32 errors description and it is ready for 64 bits too.
Thanks for the heads-up, Jean-Marc! I'll check that out!
12. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by euphoric (admin) Dec 06, 2017
- 1334 views
All of this is already working in Eu3 Standard Library and Eu4 Standard Library, and it is free! You get libcurl, wininet and winhttp which all support HTTPS. You get even all Win32 errors description and it is ready for 64 bits too.
Where is the documentation? Or how do I use it? I can't find an index.html file in the html folder.
13. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by petelomax Dec 06, 2017
- 1377 views
I'd recommend downloading Ray Smith's original and looking at the euLibCurl.txt from that.
Pete
14. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by jmduro Dec 08, 2017
- 1293 views
All of this is already working in Eu3 Standard Library and Eu4 Standard Library, and it is free! You get libcurl, wininet and winhttp which all support HTTPS. You get even all Win32 errors description and it is ready for 64 bits too.
Where is the documentation? Or how do I use it? I can't find an index.html file in the html folder.
- Curl is made of lib/_curl_constants_.e and lib/_curl_.e
- Documentation is lib/html/_curl_.html
- Usage is shown in lib/test/test_curl_.exw (.ex in Eu 4). libcurl.dll is there also.
The big differences between this version and the original eulibcurl are:
- _curl_e is based on libcurl 7.50.3 C source code, eulibcurl is based on 7.45.0
- most important constants and functions have been wrapped in eulibcurl, all constants and functions have been wrapped in _curl_.e
- _curl_.e can be used behind a proxy, eulibcurl cannot be used behind a proxy
- following functions have been added to help beginners use libcurl in _curl_.e
- procedure curl_easy_setopt(atom curl, integer option, object param)
- function curl_easy_getinfo(atom curl, integer option)
- function curl_extract_cookies( sequence headers, sequence optional )
- function curl_extract_csrf_token( sequence content )
- function curl_get(atom curl, sequence url)
- function curl_post(atom curl, sequence url, object data)
- function curl_delete(atom curl, sequence url)
Jean-Marc
15. Re: How to Diagnose http_get() Error (Returning -2)
- Posted by euphoric (admin) Dec 10, 2017
- 1276 views
Jean-Marc,
Thank you so much for the explanation and details!
I'm going to be implementing this lib into my current app this week.
I appreciate your time and effort!