Throws:

Example

setBody(body, index)

Sets the body of the entity;
The method supports all elemental JavaScript types, ArrayBuffers, WebResponses and WebEntityResponses.
When using WebResponse or WebEntityResponse as arguments, the headers identifying that the body is a WebResponse/WebEntityResponse
(Content-Type: application/http, content-transfer-encoding: binary) are automatically added to the parent WebEntityResponse.