| ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot |
HTTP_Request2HTTP_Request2 – Class representing a HTTP request message
Request URL and GET ParametersRequest URL can be set in HTTP_Request2 constructor or via HTTP_Request2::setUrl() method. Both of these accept either a string or an instance of Net_URL2. URL is stored internally as an instance of Net_URL2 that can be accessed via HTTP_Request2::getUrl(). GET request parameters can be added to URL via Net_URL2::setQueryVariable() and Net_URL2::setQueryVariables(): Setting GET parameters
<?php
HTTP AuthenticationHTTP_Request2 supports both Basic and Digest authentication schemes defined in RFC 2617. Authentication credentials can be set via HTTP_Request2::setAuth() method or given in the request URL (but in the latter case authentication scheme will default to Basic). Setting authentication credentials
<?php
There is currently an issue with Digest authentication support in Curl Adapter due to an underlying PHP cURL extension problem. Request Headers and CookiesAdditional request headers can be set via HTTP_Request2::setHeader() method. It also allows removing previosly set headers Setting request headers
<?php
Cookies can be added to the request via setHeader() method, but a specialized HTTP_Request2::addCookie() method is also provided Adding cookies to the request
<?php
Request BodyIf you are doing a POST request with Content-Type 'application/x-www-form-urlencoded' or 'multipart/form-data' (in other words, emulating POST form submission), you can add parameters via HTTP_Request2::addPostParameter() and file uploads via HTTP_Request2::addUpload(). HTTP_Request2 will take care of generating proper request body. File uploads will be streamed from disk by HTTP_Request2_MultipartBody to reduce memory consumption. Emulating POST form submission
<?php
HTTP request body can also be set directly, by providing a string or a filename to HTTP_Request2::setBody() method. This is the only way to set a request body for non-POST request. Setting "raw" request body
<?php
HTTP RedirectsSince release 0.5.0 HTTP_Request2 can automatically follow HTTP redirects if follow_redirects parameter is set to TRUE.
|
各種マニュアル:
PHPマニュアル |
PEARマニュアル |
Smarty(英語)マニュアル |
PHP-GTKマニュアル |
「HTTP_Request2」をGoogle検索
|