responseStream Property (IXMLHTTPRequest)
Represents only one of several forms in which the HTTP response can be returned.
[Script]
Script Syntax
strValue = oXMLHttpRequest.responseStream;
[Visual Basic]
Visual Basic Syntax
strValue = oXMLHttpRequest.responseStream
[C/C++]
C/C++ Syntax
HRESULT get_responseStream(VARIANT* pvarBody);
Parameters
- pvarBody [out, retval]
- The response entity body as an
IStream
.
C/C++ Return Values
- S_OK
- The value returned if successful.
- E_PENDING
- The value returned if the data is unavailable.
Example
HRESULT hr; IXMLHttpRequest *pIXMLHttpRequest = NULL; IStream *pIStream = NULL; VARIANT varValue; try { // Create XMLHttpRequest object and initialize pIXMLHttpRequest. hr = pIXMLHttpRequest->get_responseStream(&varValue); if(SUCCEEDED(hr)) { pIStream = (IStream*)varValue.punkVal; if(pIStream) { pIStream->Release(); pIStream = NULL; } } } catch(...) { if(pIStream) pIStream->Release(); DisplayErrorToUser(); } // Release pIXMLHttpRequest when finished with it.
Remarks
Variant. The property is read-only. Represents the response entity body as an IStream
. This stream returns the raw undecoded bytes as received directly from the server. Therefore, depending on what the server sent, this may appear as binary-encoded data (UTF-8, UCS-2, UCS-4, Shift_JIS, and so on).
To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button in the upper-left corner of the page.
See Also
responseBody Property | responseText Property | responseXML Property
Applies to: IXMLHTTPRequest