Click to Rate and Give Feedback
MSDN
MSDN Library
Networking
Network Protocols
WinHTTP Reference
WinHTTP Interfaces
IWinHttpRequest
IWinHttpRequest Interface

The IWinHttpRequest interface provides all of the nonevent methods for Microsoft Windows HTTP Services (WinHTTP).

Methods

The IWinHttpRequest interface inherits the methods of the IUnknown interface.

In addition, IWinHttpRequest defines the following methods.

MethodDescription

SetProxy

Sets proxy server information.

SetCredentials

Sets credentials to be used with an HTTP server, either a proxy server or an originating server.

Open

Opens an HTTP connection to an HTTP resource.

SetRequestHeader

Adds, changes, or deletes an HTTP request header.

GetResponseHeader

Retrieves the HTTP response headers.

GetAllResponseHeaders

Retrieves all HTTP response headers.

Send

Sends an HTTP request to an HTTP server.

get_Status

Retrieves the HTTP status code from the last response.

get_StatusText

Retrieves the HTTP status text.

get_ResponseText

Retrieves the response entity body as text.

get_ResponseBody

Retrieves the response entity body as an array of unsigned bytes.

get_ResponseStream

Retrieves the response entity body as an IStream.

get_Option

Retrieves a WinHTTP option value.

put_Option

Sets a WinHTTP option value.

WaitForResponse

Waits for an asynchronous Send method to complete, with optional time-out value, in seconds.

Abort

Aborts a WinHTTP Send method.

SetTimeouts

Specifies the individual time-out components of a send/receive operation, in milliseconds.

SetClientCertificate

Selects a client certificate to send to a Secure Hypertext Transfer Protocol (HTTPS) server.

SetAutoLogonPolicy

Sets the current Automatic Logon Policy.

 

Properties

The IWinHttpRequest interface defines the following properties. The preceding table includes access methods for these properties.

PropertyAccess typeDescription

Option

Read/write

A WinHTTP option value.

ResponseBody

Read-only

The response entity body as an array of unsigned bytes.

ResponseStream

Read-only

The response entity body as an IStream.

ResponseText

Read-only

The response entity body.

Status

Read-only

The HTTP status code from the last response.

StatusText

Read-only

The HTTP status text.

 

Remarks

Note  For Windows XP and Windows 2000, see the Run-Time Requirements section of the WinHttp start page.

Requirements

Minimum supported clientWindows XP, Windows 2000 Professional with SP3
Minimum supported serverWindows Server 2003, Windows 2000 Server with SP3
RedistributableWinHTTP 5.0 and Internet Explorer 5.01 or later on Windows XP and Windows 2000.
IDLHttpRequest.idl
LibraryWinhttp.lib
DLLWinhttp.dll

See Also

IWinHttpRequestEvents
WinHTTP Versions

Send comments about this topic to Microsoft

Build date: 10/8/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker