Subversion Repositories Kolibri OS

Rev

Rev 5732 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5732 Rev 5769
Line 1... Line 1...
1
get(*url, identifier, flags, *add_header);
1
get(*url, identifier, flags, *add_header);
2
	*url = pointer to ASCIIZ URL
2
	*url = pointer to ASCIIZ URL
3
	identifier = identified of previously opened connection, or 0 to open a new one
3
	identifier = identifier of previously opened connection (keep-alive), or 0 to open a new one.
4
	flags = bit flags (see http.inc user flags and the end of this document)
4
	flags = bit flags (see end of this document).
5
	*add_header = pointer to ASCIIZ additional header parameters, or null for none.
5
	*add_header = pointer to ASCIIZ additional header parameters, or null for none.
6
			Every additional parameter must end with CR LF bytes, including the last line.
6
			Every additional parameter must end with CR LF bytes, including the last line.
7
Initiates a HTTP connection, using 'GET' method.
7
Initiates a HTTP connection, using 'GET' method.
8
 - returns 0 on error, identifier otherwise.
8
 - returns 0 on error, identifier otherwise.
Line 9... Line 9...
9
 
9
 
10
head(*url, identifier, flags, *add_header);
10
head(*url, identifier, flags, *add_header);
11
	*url = pointer to ASCIIZ URL
11
	*url = pointer to ASCIIZ URL
12
	identifier = identified of previously opened connection, or 0 to open a new one
12
	identifier = identifier of previously opened connection (keep-alive), or 0 to open a new one.
13
	flags = bit flags (see http.inc user flags and the end of this document)
13
	flags = bit flags (see end of this document).
14
	*add_header = pointer to ASCIIZ additional header parameters, or null for none.	
14
	*add_header = pointer to ASCIIZ additional header parameters, or null for none.	
15
			Every additional parameter must end with CR LF bytes, including the last line.	
15
			Every additional parameter must end with CR LF bytes, including the last line.	
16
Initiate a HTTP connection, using 'HEAD' method.
16
Initiate a HTTP connection, using 'HEAD' method.
Line 17... Line 17...
17
 - returns 0 on error, identifier otherwise
17
 - returns 0 on error, identifier otherwise
18
 
18
 
19
post(*url, identifier, flags, *add_header, *content-type, content-length);
19
post(*url, identifier, flags, *add_header, *content-type, content-length);
20
	*url = pointer to ASCIIZ URL
20
	*url = pointer to ASCIIZ URL
21
	identifier = identified of previously opened connection, or 0 to open a new one
21
	identifier = identifier of previously opened connection (keep-alive), or 0 to open a new one.
22
	flags = bit flags (see http.inc user flags and the end of this document)
22
	flags = bit flags (see end of this document).
23
	*add_header = pointer to ASCIIZ additional header parameters, or null for none.	
23
	*add_header = pointer to ASCIIZ additional header parameters, or null for none.	
24
			Every additional parameter must end with CR LF bytes, including the last line.
24
			Every additional parameter must end with CR LF bytes, including the last line.
25
	*content-type = pointer to ASCIIZ string containing content type.
25
	*content-type = pointer to ASCIIZ string containing content type.
Line 57... Line 57...
57
 
57
 
Line 58... Line 58...
58
 
58
 
Line -... Line 59...
-
 
59
User flags:
-
 
60
 
59
User flags:
61
For the flag codes themselves, see http.inc file.
60
 
62
 
Line 61... Line 63...
61
 FLAG_KEEPALIVE will keep the connection open after first GET/POST/.. so you can send a second request on the same TCP session. 
63
 FLAG_KEEPALIVE will keep the connection open after first GET/POST/.. so you can send a second request on the same TCP session. 
62
In this case, the session must be closed manually when done by using the exported disconnect() function.
64
In this case, the session must be closed manually when done by using the exported disconnect() function.