Subversion Repositories Kolibri OS

Rev

Rev 4996 | Rev 5732 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4168 hidnplayr 1
 
5534 hidnplayr 2
	*url = pointer to ASCIIZ URL
4168 hidnplayr 3
	identifier = identified of previously opened connection, or 0 to open a new one
5534 hidnplayr 4
	flags = bit flags (see http.inc user flags)
5
	*add_header = pointer to ASCIIZ additional header parameters, or null for none.
4221 hidnplayr 6
			Every additional parameter must end with CR LF bytes, including the last line.
4242 hidnplayr 7
Initiates a HTTP connection, using 'GET' method.
4168 hidnplayr 8
 - returns 0 on error, identifier otherwise.
9
10
 
5534 hidnplayr 11
	*url = pointer to ASCIIZ URL
4168 hidnplayr 12
	identifier = identified of previously opened connection, or 0 to open a new one
5534 hidnplayr 13
	flags = bit flags (see http.inc user flags)
14
	*add_header = pointer to ASCIIZ additional header parameters, or null for none.
4221 hidnplayr 15
			Every additional parameter must end with CR LF bytes, including the last line.
4242 hidnplayr 16
Initiate a HTTP connection, using 'HEAD' method.
4168 hidnplayr 17
 - returns 0 on error, identifier otherwise
18
19
 
5534 hidnplayr 20
	*url = pointer to ASCIIZ URL
4168 hidnplayr 21
	identifier = identified of previously opened connection, or 0 to open a new one
5534 hidnplayr 22
	flags = bit flags (see http.inc user flags)
23
	*add_header = pointer to ASCIIZ additional header parameters, or null for none.
4221 hidnplayr 24
			Every additional parameter must end with CR LF bytes, including the last line.
4242 hidnplayr 25
	*content-type = pointer to ASCIIZ string containing content type.
4168 hidnplayr 26
	content-length = length of the content (in bytes).
27
Initiate a HTTP connection, using 'POST' method.
28
The content itself must be send to the socket (which you can find in the structure),
29
using system function 75, 6.
30
 - returns 0 on error, identifier otherwise
31
32
 
4996 hidnplayr 33
	identifier = identifier which one of the previous functions returned
4168 hidnplayr 34
This procedure will handle all incoming data for a connection and place it in the buffer.
35
As long as the procedure expects more data, -1 is returned and the procedure must be called again.
36
 - When transfer is done, the procedure will return 0.
37
38
 
4541 hidnplayr 39
This structure is defined in http.inc (and not copied here because it might still change.)
4168 hidnplayr 40
The identifier used by the functions is actually a pointer to this structure.
41
In the dword named .flags, the library will set various bit-flags indicating the status of the process.
42
(When a transfer is done, one should check these bit-flags to find out if the transfer was error-free.)
43
The HTTP header is placed at the end of this structure. The content is placed in another buffer.
4541 hidnplayr 44
The dword .status contains the status code received from the server (e.g. 200 for OK).
4168 hidnplayr 45
In header_length you'll find the length of the header as soon as it has been received.
46
In content_ptr you'll find a pointer to the actual content.
4541 hidnplayr 47
In content_length you'll find the length of the content.
48
In content_received, you'll find the number of content bytes already received.
4986 hidnplayr 49
50
 
4996 hidnplayr 51
	identifier = identifier which one of the previous functions returned
52
	*dataptr = pointer to the data you want to send
53
	datalength = length of the data to send (in bytes)
54
This procedure can be used to send data to the server (POST)
55
 - returns number of bytes sent, -1 on error
56
57
 
4986 hidnplayr 58