HttpRequest::setBody

(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.

Caution

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

回傳值

如果成功則回傳 TRUE,失敗則回傳 FALSE

註釋

Caution

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

參見

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top