The HttpRequest
PHP 手册

HttpRequest::setRawPostData

(PECL pecl_http 0.14.0-1.4.1)

HttpRequest::setRawPostDataSet raw post data

说明

public bool HttpRequest::setRawPostData ([ string $raw_post_data ] )

Set raw post data to send, overwriting previously set raw post data. Don't forget to specify a content type. Affects only POST and custom requests.

Only either post fields or raw post data can be used for each request. Raw post data has higher precedence and will be used even if post fields are set.

参数

raw_post_data

raw post data

返回值

如果成功则返回 TRUE,失败则返回 FALSE


The HttpRequest
PHP 手册