Home > PHP > Function > > HttpRequest::setPostFields()

HttpRequest::setPostFields()

HttpRequest::setPostFields - Set post fields

Syntax

public HttpRequest::setPostFields (array $post_data)

Arguments

  • post_data - an associative array containing the post fields; if empty, the post data will be unset

Description

Set the POST data entries, overwriting previously set POST data.

Version

PHP PECL pecl_http >= 0.10.0

Return value

Returns TRUE on success or FALSE on failure.