2. Re: get_http()
- Posted by jeremy (admin) Dec 10, 2010
- 1293 views
could someone post an example please.
The name of this has changed to man:std_net_http#http_get as we also have man:std_net_http#http_post.
An example of using http_get is can be found in demo/net/wget.ex or demo/net/google_tts.ex. Here is a simple example also:
include std/net/http.e object result = http_get("http://example.com") if atom(result) then printf(1, "Web error: %d\n", result) abort(1) end if printf(1, "Content: %s\n", { result[2] }) -- headers are stored in result[1]
NOTE: I added the above example to the docs on http_get, it is not yet reflected in the online manual however, give it a few hours.
Jeremy
3. Re: get_http()
- Posted by abec Dec 10, 2010
- 1278 views
I see you only used the first parameter what about host and file? When do you use them
4. Re: get_http()
- Posted by jimcbrown (admin) Dec 10, 2010
- 1331 views
I see you only used the first parameter what about host and file? When do you use them
What?
The first parameter is the URL - which is made up of a combination of factors, including hostname and filepath/filename.
http_get() returns the data as an object, so there's no "local file" that it needs to know about to save the data to.
5. Re: get_http()
- Posted by jeremy (admin) Dec 10, 2010
- 1295 views
I see you only used the first parameter what about host and file? When do you use them
What?
The first parameter is the URL - which is made up of a combination of factors, including hostname and filepath/filename.
http_get() returns the data as an object, so there's no "local file" that it needs to know about to save the data to.
abec, are you using pre-RC1 and pre-RC2 euphoria still? That has get_url() ? I forget what it's signature use to be, but get_url is no longer in the newer versions. You should upgrade.
Jeremy
6. Re: get_http()
- Posted by abec Dec 10, 2010
- 1308 views
I see something is fishy. I'm using a help I downloaded in compiled html format(.chm) which discusses get_http()with slightly different parameters and you're talking about http_get() so I assume my help file is out of date.
Thanks just the same for your help
Abe
7. Re: get_http()
- Posted by jeremy (admin) Dec 10, 2010
- 1347 views
I see something is fishy. I'm using a help I downloaded in compiled html format(.chm) which discusses get_http()with slightly different parameters and you're talking about http_get() so I assume my help file is out of date.
Thanks just the same for your help
I think the CHM is outdated. It's an unofficial help source generated on a periodic basis by a user. Things have been moving rapidly. I would suggest until the CHM is updated using the online manual. Corrections are made to it on a daily basis.
Sorry for your difficulties through this transition time.
Jeremy
8. Re: get_http()
- Posted by Vinoba Dec 11, 2010
- 1272 views
I think the CHM is outdated. .... I would suggest until the CHM is updated using the online manual. Corrections are made to it on a daily basis.
Sorry for your difficulties through this transition time.
Jeremy
Is there a similar current on line manual for using A. wxEuphoris B. Win32Lib?