Set request body.

@param string $body
509153
public function setBody($body)
    {
        $this->body = empty($body) ?
            null :
            Stream::factory($body);
    }
794113
public static function normalize($body, $method)
    {
        if ($method === RequestInterface::METHOD_HEAD || empty($body)) {
            return;
        }

        if (is_callable($body)) {
            return call_user_func($body);
        }

        return $body;
    }
939699
public function setBody(RequestInterface $request, $body, $options)
    {
        return RequestHandler::setBody($request, $body, $options);
    }
187453
private function setFrame($bodySize)
    {
        $this->frame = $this->factory->createFrame(
            $this->command,
            $this->headers,
            (string)substr($this->buffer, $this->offset, $bodySize),
            $this->legacyMode
        );

        $this->expectedBodyLength = null;
        $this->headers = [];
        $this->mode = self::MODE_HEADER;
    }
1267390
public function setBody( $body, $contentType = null, $charset = null )
	{
		$this->swift->setBody( $body, $contentType, $charset );
	}
1328395
public function update($body) {
        $data = Values::of(array('Body' => $body, ));

        $payload = $this->version->update(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new MessageInstance(
            $this->version,
            $payload,
            $this->solution['accountSid'],
            $this->solution['sid']
        );
    }
621693
public void setBody(AstNode body) {
        this.body = body;
        int end = body.getPosition() + body.getLength();
        this.setLength(end - this.getPosition());
        body.setParent(this);
    }
1140751
protected function setBody($body = 'php://temp')
    {
        if (is_string($body) || is_resource($body)) {
            $body = new Stream($body, 'w+b');
        }
        if (! $body instanceof StreamInterface) {
            throw new InvalidArgumentException(sprintf(
                'Invalid body provided. Must be a string resource identifier, or resource, '
                . 'or instance of Psr\Http\Message\StreamInterface; received "%s".',
                is_object($body) ? get_class($body) : gettype($body)
            ));
        }
        $this->setBodyInstance($body);

        return $this;
    }
982021
@Override
    public void setBody(String body) {
        super.setBody(body);
        this.jsonValue = JsonValue.readFrom(body);
    }
862970
public function setBody($responseBody)
	{
		if($this->initialized !== true)
			throw new \Exception('ResponseBuilder not initialized. Call init() first');
		
		// TODO make sure, this can only be a string or a BaseObject
		// TODO throws an error when not valid JSON - how to deal with this?
		if(gettype($responseBody) != 'string')
			$responseBody = $responseBody->getJSONString();
		
		$this->sonicResponse->setBody($responseBody);
		
		return $this;
	}
1003515
def _set_body(self, body):
        """"""
        assert isinstance(body, CodeStatement)
        if isinstance(body, CodeBlock):
            self.body = body
        else:
            self.body._add(body)
259836
protected function setBody($body = null)
    {
        parent::setBody($body);

        if (is_array($body) || is_object($body)) {
            $this->post = (array) $body;
        } else {
            $this->post = [];
        }
    }
1081395
public function setRequest(Request $request)
    {
        $this->request = $request;

        $this->cachedRoot = null;
        $this->cachedScheme = null;
        $this->routeGenerator = null;
    }
1250770
public void setBody(String body)
    {
    	String xbody = body;
    	String [] row = xbody.split("\n");
    	for(int i=0; i<row.length; i++){
    		this.m_xbody.add(row[i]);
    	}
    }
1318362
public function setBody($body)
    {
        $node = $this->getBody(false);
        if(!$node){
            $node = $this->createElement('body');
            $this->doc->appendChild($node);
        }
        $node->nodeValue = htmlspecialchars($body);
    }
254127
public function setBody($body) {
        if (is_string($body) || is_null($body)) {
            $this->rawBody = $this->body = $body;
        } elseif (is_array($body) || is_bool($body) || is_numeric($body) || $body instanceof \JsonSerializable) {
            $this->rawBody = json_encode($body, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
            $this->body = $body;
        } else {
            $this->rawBody = '';
            $this->body = $body;
        }

        return $this;
    }
874892
public function setBody($body)
    {
        $this->code = array(new CodeLineGenerator($body, $this->getIndentationLevel(), $this->getIndentationString()));

        return $this;
    }