Doc #55401 [Opn]: No Doc for existing functions HttpRequest::setBody(), HttpRequest::getBody()
| From: | trendfischer at googlemail dot com | Date: | Thu, 11 Aug 2011 15:06:31 +0000 |
| Subject: | Doc #55401 [Opn]: No Doc for existing functions HttpRequest::setBody(), HttpRequest::getBody() | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-6991@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55401&edit=1
ID: 55401
User updated by: trendfischer at googlemail dot com
Reported by: trendfischer at googlemail dot com
Summary: No Doc for existing functions
HttpRequest::setBody(), HttpRequest::getBody()
Status: Open
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Forgot to add the Version of pecl_http on my machine, it is 1.7.1
Previous Comments:
------------------------------------------------------------------------
[2011-08-11 14:59:04] 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"
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55401&edit=1