Represents the response entity body as an IStream. This stream returns the raw un-decoded bytes as received directly from the server. So depending on what the server sent, this may appear as binary-encoded data (UTF-8, UCS-2, UCS-4, shiftJis, and so on).
Visual Basic Syntax
strValue = oXMLHttpRequest.responseStream
C/C++ Syntax
HRESULT get_responseStream(
VARIANT *pvarVal);
Parameters
pvarVal
[out]
Response entity body as an IStream.
C/C++ Return Value
Returns S_OK if successful, or E_PENDING if the data is unavailable.
Remarks
This property represents only one of several forms in which the HTTP response can be returned.
C/C++ 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 done with it.
See Also