wxHTTP

wxHTTP
Creation Parameters
See the http_demo.exw program for a simple example. These are the steps needed in order to use this class.
  1. Call set_http_header and set the Content-type.
  2. Call http_connect, passing in the host, ex: "www.example.com".
  3. Call get_http_input, passing in the relative address, use "\" for the root.
  4. Use stream_read to retrieve the data.

Functions/Procedures
Supertopics

wxHTTP

[func]
get_http_content_type
( atom http )

Category: wxHTTP

Returns the type of the content of the last opened stream. It is a mime-type.


wxHTTP

[func]
get_http_header
( atom http, object header )

Category: wxHTTP

Returns the data attached with a field whose name is specified by header. If the field doesn't exist, it will return an empty string and not a NULL string.

Note

The header is not case-sensitive, i.e. "CONTENT-TYPE" and "content-type" represent the same header.


wxHTTP

[func]
get_http_input
( atom http )

Category: wxHTTP

Returns an input stream that can be used with stream_read() to fetch the file from the url.


wxHTTP

[func]
http_connect
( atom http, object host, atom port )

Category: wxHTTP

Connects to a server using the specified address host:port.


wxHTTP

[proc]
set_http_header
( atom http, object header, object data )

Category: wxHTTP

Sets data of a field to be sent during the next request to the HTTP server. The field name is specified by header and the content by data. This is a low level function and it assumes that you know what you are doing.


wxHTTP

[proc]
set_http_post_buffer
( atom http, object buffer )

Category: wxHTTP


wxHTTP

[proc]
set_http_proxy_mode
( atom http, atom on )

Category: wxHTTP