Use the IXMLHTTPRequest2 interface to enable applications to configure and send HTTP request operations in multithreaded apartments (MTA) and use callbacks to receive notifications during response processing.
- Set properties on outgoing HTTP requests.
- Process incoming HTTP response data before the HTTP response has finished downloading.
- Create custom streams to receive HTTP responses.
- Set cookies for outgoing HTTP requests and get cookies from incoming HTTP responses.
Members
The IXMLHTTPRequest2 interface inherits from the IUnknown interface. IXMLHTTPRequest2 also has these types of members:
Methods
The IXMLHTTPRequest2 interface has these methods.
| Method | Description |
|---|---|
| Abort |
Cancels the current HTTP request. |
| GetAllResponseHeaders |
Retrieves the values of all the HTTP response headers. |
| GetCookie |
Gets a cookie associated with the specified URL. |
| GetResponseHeader |
Retrieves the value of an HTTP header from the response body. |
| Open |
Initializes an IXMLHTTPRequest2 request and specifies the method, URL, and authentication information for the request. After calling this method, you must call the Send method to send the request and data, if any, to the server. |
| Send |
Sends an HTTP request to the server and receives a response. |
| SetCookie |
Sets a cookie associated with the specified URL. |
| SetCustomResponseStream |
Provides a custom stream to replace the standard stream for receiving an HTTP response. |
| SetProperty |
Sets a property on an outgoing HTTP request. |
| SetRequestHeader |
Specifies the name of an HTTP header to be sent to the server along with the default request headers. |
Remarks
IXMLHTTPRequest2 allows applications to run in a Multi Threaded Apartment (MTA), a requirement for running under the Windows Runtime (WinRT) in Windows 8.
IXMLHTTPRequest2 implements a callback model for event handling. Because IXMLHTTPRequest2 methods allow only asynchronous method calls, to receive completion callbacks an application must pass a pointer to an IXMLHTTPRequest2Callback object when it calls IXMLHTTPRequest2::Open to create an HTTP request.
Requirements
|
Minimum supported client | Windows 8 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server | Windows Server 2012 [desktop apps | Windows Store apps] |
|
Version | MSXML 6.0 and later |
|
Header |
|
|
IDL |
|
See also
Send comments about this topic to Microsoft
Build date: 10/26/2012