Set request body to send, overwriting previously set request body.


(PECL pecl_http >= 1.5.0)

HttpRequest::setBodySet request body to send, overwriting previously set request body.

Описание

bool HttpRequest::setBody ([ string $request_body_data ] )

Set request body to send, overwriting previously set request body.

Список параметров

request_body_data

The request body to overwrite the existing request body with.

Предостережение

Ensure that a Content-Type is specified in the request body.

Возвращаемые значения

Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.

Примечания

Предостережение

This method was previously available as HttpRequest::setRawPostData().

Смотрите также