Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - DOM Reference

responseBody Property (IXMLHTTPRequest)

Represents only one of several forms in which the HTTP response can be returned.

[Script]

Script Syntax

strValue = oXMLHttpRequest.responseBody;

Example

var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.5.0");
xmlhttp.open("GET", "http://localhost/sample.xml", false);
xmlhttp.send();
alert(xmlhttp.responseBody);
[Visual Basic]

Visual Basic Syntax

strValue = oXMLHttpRequest.responseBody

Example

Dim xmlhttp As New Msxml2.XMLHTTP50
xmlhttp.open "GET", "http://localhost/sample.xml", False
xmlhttp.send
MsgBox xmlhttp.responseBody
[C/C++]

C/C++ Syntax

HRESULT get_responseBody(VARIANT* pvarBody);

Parameters

pvarBody [out, retval]
The response entity body as an array of unsigned bytes.

C/C++ Return Values

S_OK
The value returned if successful.
E_PENDING
The value returned if the data is unavailable.

Remarks

Variant. The property is read-only. Represents the response entity body as an array of unsigned bytes, namely a SAFEARRAY of type VT_ARRAY | VT_UI1. This contains 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 Language Filter in the upper-left corner of the page.

See Also

responseStream Property | responseText Property | responseXML Property

Applies to: IXMLHTTPRequest