L_InetHttpOpenRequest

#include "ltweb.h"

L_LTWEB_API L_INT L_InetHttpOpenRequest(hHttp, uType, pszTarget, pszReferer, pszVersion, dwFlags)

HINET hHttp;

/* handle to an HTTP connection*/

L_UINT uType;

/* type of request*/

L_TCHAR *pszTarget;

/* the target of the request*/

L_TCHAR *pszReferer;

/* address of URL that initiated the request*/

L_TCHAR *pszVersion;

/* HTTP version*/

L_UINT32 dwFlags;

/* request flags*/

Creates a new HTTP request to be sent to the server.

Parameter

Description

hHttp

Handle to the HTTP connection. It is the same handle obtained using the L_InetHttpConnect function.

uType

Specifies the type of request. Possible values are:

 

Value

Meaning

 

HTTP_GET

Send an HTTP-GET request.

 

HTTP_PUT

Send an HTTP-PUT request.

 

HTTP_POST

Send an HTTP-POST request.

pszTarget

Character string that contains the name of the file, executable module or search specifier to get or post.

pszReferer

Character string that contains the name of the document on which the link is found.

pszVersion

Character string that contains the HTTP version. If this parameter is NULL, "HTTP/1.0" is used.

dwFlags

Reserved for future use. Use 0.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

An HTTP request holds a request to be sent to an HTTP server and contains all RFC822/MIME/HTTP headers to be sent as part of the request.

L_InetHttpOpenRequest must be called before calling the following functions L_InetHttpSendBitmap, L_InetHttpSendData, L_InetHttpSendForm and L_InetHttpSendRequest.

Required DLLs and Libraries

LTWEB

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

L_InetHttpCloseRequest, L_InetHttpConnect

Topics:

HTTP Functions: HTTP Connections

 

Working with HTTP Functions

Example

For an example, refer to L_InetHttpConnect.