php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55401 No Doc for existing functions HttpRequest::setBody(), HttpRequest::getBody()
Submitted: 2011-08-11 14:59 UTC Modified: 2013-10-05 09:12 UTC
From: trendfischer at googlemail dot com Assigned: krakjoe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: trendfischer at googlemail dot com
New email:
PHP Version: OS:

 

 [2011-08-11 14:59 UTC] trendfischer at googlemail dot com
Description:
------------
The HttpRequest-Class offers the methods getBody() and setBody(). The only link 
to these function is in a comment to the method HttpRequest::setRawPostData. Some 
other functions are missing, too. But especially setBody() is important if you 
begin using REST-API based applications like CouchDB or ElasticSearch, where you 
have to put JSON-Data in the HTTP-Body.

Test script:
---------------
<?php 
var_dump(get_class_methods('HttpRequest'));
//php -r "var_dump(get_class_methods('HttpRequest'));"

Expected result:
----------------
array(70) {
  [0]=>
  string(11) "__construct"
  [1]=>
  string(10) "setOptions"
  [2]=>
  string(10) "getOptions"
  [3]=>
  string(13) "setSslOptions"
  [4]=>
  string(13) "getSslOptions"
  [5]=>
  string(13) "addSslOptions"
  [6]=>
  string(10) "addHeaders"
  [7]=>
  string(10) "getHeaders"
  [8]=>
  string(10) "setHeaders"
  [9]=>
  string(10) "addCookies"
  [10]=>
  string(10) "getCookies"
  [11]=>
  string(10) "setCookies"
  [12]=>
  string(13) "enableCookies"
  [13]=>
  string(12) "resetCookies"
  [14]=>
  string(12) "flushCookies"
  [15]=>
  string(9) "setMethod"
  [16]=>
  string(9) "getMethod"
  [17]=>
  string(6) "setUrl"
  [18]=>
  string(6) "getUrl"
  [19]=>
  string(14) "setContentType"
  [20]=>
  string(14) "getContentType"
  [21]=>
  string(12) "setQueryData"
  [22]=>
  string(12) "getQueryData"
  [23]=>
  string(12) "addQueryData"
  [24]=>
  string(13) "setPostFields"
  [25]=>
  string(13) "getPostFields"
  [26]=>
  string(13) "addPostFields"
  [27]=>
  string(7) "setBody"
  [28]=>
  string(7) "getBody"
  [29]=>
  string(7) "addBody"
  [30]=>
  string(14) "setRawPostData"
  [31]=>
  string(14) "getRawPostData"
  [32]=>
  string(14) "addRawPostData"
  [33]=>
  string(12) "setPostFiles"
  [34]=>
  string(11) "addPostFile"
  [35]=>
  string(12) "getPostFiles"
  [36]=>
  string(10) "setPutFile"
  [37]=>
  string(10) "getPutFile"
  [38]=>
  string(10) "setPutData"
  [39]=>
  string(10) "getPutData"
  [40]=>
  string(10) "addPutData"
  [41]=>
  string(4) "send"
  [42]=>
  string(15) "getResponseData"
  [43]=>
  string(17) "getResponseHeader"
  [44]=>
  string(18) "getResponseCookies"
  [45]=>
  string(15) "getResponseCode"
  [46]=>
  string(17) "getResponseStatus"
  [47]=>
  string(15) "getResponseBody"
  [48]=>
  string(15) "getResponseInfo"
  [49]=>
  string(18) "getResponseMessage"
  [50]=>
  string(21) "getRawResponseMessage"
  [51]=>
  string(17) "getRequestMessage"
  [52]=>
  string(20) "getRawRequestMessage"
  [53]=>
  string(10) "getHistory"
  [54]=>
  string(12) "clearHistory"
  [55]=>
  string(15) "getMessageClass"
  [56]=>
  string(15) "setMessageClass"
  [57]=>
  string(7) "factory"
  [58]=>
  string(3) "get"
  [59]=>
  string(4) "head"
  [60]=>
  string(8) "postData"
  [61]=>
  string(10) "postFields"
  [62]=>
  string(7) "putData"
  [63]=>
  string(7) "putFile"
  [64]=>
  string(9) "putStream"
  [65]=>
  string(14) "methodRegister"
  [66]=>
  string(16) "methodUnregister"
  [67]=>
  string(10) "methodName"
  [68]=>
  string(12) "methodExists"
  [69]=>
  string(10) "encodeBody"
}



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-11 15:06 UTC] trendfischer at googlemail dot com
Forgot to add the Version of pecl_http on my machine, it is 1.7.1
 [2013-10-05 09:12 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2013-10-05 09:12 UTC] krakjoe@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

This has been fixed in the documentation for a while, so closing.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 22:00:01 2026 UTC