Download Dynamic C TCP/IP Users Manual

Transcript
httpc_post
int httpc_post( httpc_Socket far *s, const char *host, word port,
const char *file, const char *auth, const char far *postdata);
DESCRIPTION
Connect to “host” and POST “postdata” to “file” using “auth” credentials.
PARAMETERS
s
Pointer to socket structure to use for connection.
host
Hostname (or dotted IP) to connect to.
port
Port to connect to (typically 80).
file
Filename to request (should start with “/”)
auth
Optional username and password (separated with “:”) to authenticate with
(or NULL for no authentication).
postdata
Data to post (already URL-encoded and null terminated)
RETURN VALUE
0: Success
-NETERR_DNSERROR: Can't resolve hostname
SEE ALSO
httpc_post_url, httpc_post_ext
304
rabbit.com
HTTP Client