HttpRequest
PHP Manual

HttpRequest::setBody

(PECL pecl_http >= 1.5.0)

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

Descrizione

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

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

Elenco dei parametri

request_body_data

The request body to overwrite the existing request body with.

Attenzione

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

Valori restituiti

Restituisce TRUE in caso di successo, FALSE in caso di fallimento.

Note

Attenzione

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

Vedere anche:


HttpRequest
PHP Manual