Наш чат в Telegram для обмена идеями, проектами, мыслями, людьми в сфере ИТ г.Ростова-на-Дону: @it_rostov

The HttpRequest

(Информация о версии неизвестна, возможно, только в SVN)

Обзор классов


HttpRequest {
public bool addCookies ( array $cookies )
public bool addHeaders ( array $headers )
public bool addPostFields ( array $post_data )
public bool addPostFile ( string $name , string $file [, string $content_type = "application/x-octetstream" ] )
public bool addPutData ( string $put_data )
public bool addQueryData ( array $query_params )
public bool addRawPostData ( string $raw_post_data )
public bool addSslOptions ( array $options )
public void clearHistory ( void )
public void __construct ([ string $url [, int $request_method = HTTP_METH_GET [, array $options ]]] )
public bool enableCookies ( void )
public string getContentType ( void )
public array getCookies ( void )
public array getHeaders ( void )
public HttpMessage getHistory ( void )
public int getMethod ( void )
public array getOptions ( void )
public array getPostFields ( void )
public array getPostFiles ( void )
public string getPutData ( void )
public string getPutFile ( void )
public string getQueryData ( void )
public string getRawPostData ( void )
public string getRawRequestMessage ( void )
public string getRawResponseMessage ( void )
public HttpMessage getRequestMessage ( void )
public string getResponseBody ( void )
public int getResponseCode ( void )
public array getResponseCookies ([ int $flags = 0 [, array $allowed_extras ]] )
public array getResponseData ( void )
public mixed getResponseHeader ([ string $name ] )
public mixed getResponseInfo ([ string $name ] )
public HttpMessage getResponseMessage ( void )
public string getResponseStatus ( void )
public array getSslOptions ( void )
public string getUrl ( void )
public bool resetCookies ([ bool $session_only = false ] )
public HttpMessage send ( void )
public bool setContentType ( string $content_type )
public bool setCookies ([ array $cookies ] )
public bool setHeaders ([ array $headers ] )
public bool setMethod ( int $request_method )
public bool setOptions ([ array $options ] )
public bool setPostFields ( array $post_data )
public bool setPostFiles ( array $post_files )
public bool setPutData ([ string $put_data ] )
public bool setPutFile ([ string $file = "" ] )
public bool setQueryData ( mixed $query_data )
public bool setRawPostData ([ string $raw_post_data ] )
public bool setSslOptions ([ array $options ] )
public bool setUrl ( string $url )
}

Class Members

Свойства

Instance Properties
Modifiers Type Name Description
privatearrayoptionsrequest options to configure the request; see опции запроса
privatearraypostFieldsform data:
array("fieldname" => "fieldvalue")

privatearraypostFilesfiles to upload:
array(array("name" => "image", "file" => "/home/u/images/u.png", "type" => "image/png"))

privatearrayresponseInfoinformation (statistical) about the request/response; see Информация о запросе/ответе
privateHttpMessageresponseMessagethe response message
privateintegerresponseCodethe numerical response code
privatestringresponseStatusthe literal response status text
privateintegermethodthe request method to use
privatestringurlthe request url
privatestringcontentTypethe content type to use for raw post requests
privatestringrawPostDataraw post data
privatestringqueryDataquery parameters
privatestringputFilethe file to upload with a PUT request
privatestringputDataraw data to upload with a PUT request
privateHttpMessagehistorythe whole request/response history if history logging is enabled
publicbooleanrecordHistorywhether to enable history logging

Предопределенные константы

Type Name Description
integerMETH_GETGET request method
integerMETH_HEADHEAD request method
integerMETH_POSTPOST request method
integerMETH_PUTPUT request method
integerMETH_DELETEDELETE request method
integerMETH_OPTIONSOPTIONS request method
integerMETH_TRACETRACE request method
integerMETH_CONNECTCONNECT request method
integerMETH_PROPFINDPROPFIND request method
integerMETH_PROPPATCHPROPPATCH request method
integerMETH_MKCOLMKCOL request method
integerMETH_COPYCOPY request method
integerMETH_MOVEMOVE request method
integerMETH_LOCKLOCK request method
integerMETH_UNLOCKUNLOCK request method
integerMETH_VERSION_CONTROLVERSION-CONTROL request method
integerMETH_REPORTREPORT request method
integerMETH_CHECKOUTCHECKOUT request method
integerMETH_CHECKINCHECKIN request method
integerMETH_UNCHECKOUTUNCHECKOUT request method
integerMETH_MKWORKSPACEMKWORKSPACE request method
integerMETH_UPDATEUPDATE request method
integerMETH_LABELLABEL request method
integerMETH_MERGEMERGE request method
integerMETH_BASELINE_CONTROLBASELINE-CONTROL request method
integerMETH_MKACTIVITYMKACTIVITY request method
integerMETH_ACLACL request method
integerVERSION_1_0HTTP protocol version 1.0
integerVERSION_1_1HTTP protocol version 1.1
integerVERSION_ANYany HTTP protocol version
integerAUTH_BASICbasic authentication
integerAUTH_DIGESTdigest authentication
integerAUTH_NTLMNTLM authentication
integerAUTH_GSSNEGGSS negotiate authentication
integerAUTH_ANYany authentication
integerPROXY_SOCKS4SOCKS v4 proxy
integerPROXY_SOCKS5SOCKS v5 proxy
integerPROXY_HTTPHTTP proxy
integerSSL_VERSION_TLSv1use TLS v1
integerSSL_VERSION_SSLv2use SSL v2
integerSSL_VERSION_SSLv3use SSL v3
integerSSL_VERSION_ANYuse any SSL/TLS method
integerIPRESOLVE_V4resolve via IPv4 only
integerIPRESOLVE_V6resolve via IPv6 only
integerIPRESOLVE_ANYuse any resolving methods

Содержание


Описание класса httprequest, примеры использования класса httprequest.



Смотрите также:
Описание на ru2.php.net
Описание на php.ru