TYPO3  7.6
Public Member Functions | List of all members
HttpRequest Class Reference
Inheritance diagram for HttpRequest:
HTTP_Request2

Public Member Functions

 __construct ($url=null, $method=self::METHOD_GET, array $config=array())
 
 setConfiguration (array $config=array())
 
- Public Member Functions inherited from HTTP_Request2
 __construct ($url=null, $method=self::METHOD_GET, array $config=array())
 
 setUrl ($url)
 
 getUrl ()
 
 setMethod ($method)
 
 getMethod ()
 
 setConfig ($nameOrConfig, $value=null)
 
 getConfig ($name=null)
 
 setAuth ($user, $password= '', $scheme=self::AUTH_BASIC)
 
 getAuth ()
 
 setHeader ($name, $value=null, $replace=true)
 
 getHeaders ()
 
 addCookie ($name, $value)
 
 setBody ($body, $isFilename=false)
 
 getBody ()
 
 addUpload ($fieldName, $filename, $sendFilename=null, $contentType=null)
 
 addPostParameter ($name, $value=null)
 
 attach (SplObserver $observer)
 
 detach (SplObserver $observer)
 
 notify ()
 
 setLastEvent ($name, $data=null)
 
 getLastEvent ()
 
 setAdapter ($adapter)
 
 setCookieJar ($jar=true)
 
 getCookieJar ()
 
 send ()
 

Additional Inherited Members

- Public Attributes inherited from HTTP_Request2
const METHOD_OPTIONS = 'OPTIONS'
 
const METHOD_GET = 'GET'
 
const METHOD_HEAD = 'HEAD'
 
const METHOD_POST = 'POST'
 
const METHOD_PUT = 'PUT'
 
const METHOD_DELETE = 'DELETE'
 
const METHOD_TRACE = 'TRACE'
 
const METHOD_CONNECT = 'CONNECT'
 
const AUTH_BASIC = 'basic'
 
const AUTH_DIGEST = 'digest'
 
const REGEXP_INVALID_TOKEN = '![\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]!'
 
const REGEXP_INVALID_COOKIE = '/[\s,;]/'
 
- Protected Member Functions inherited from HTTP_Request2
 fopenWrapper ($file, $detectType=false)
 
- Static Protected Member Functions inherited from HTTP_Request2
static detectMimeType ($filename)
 
- Protected Attributes inherited from HTTP_Request2
 $observers = array()
 
 $url
 
 $method = self::METHOD_GET
 
 $auth
 
 $headers = array()
 
 $config
 
 $lastEvent
 
 $body = ''
 
 $postParams = array()
 
 $uploads = array()
 
 $adapter
 
 $cookieJar = null
 

Detailed Description

HTTP Request Utility class

Extends and sets TYPO3 environment defaults

Definition at line 22 of file HttpRequest.php.

Constructor & Destructor Documentation

__construct (   $url = null,
  $method = self::METHOD_GET,
array  $config = array() 
)

Default constructor - sets TYPO3 defaults

Parameters
string | \Net_Url2$urlRequest URL
string$methodRequest Method (GET, HEAD or POST). Redirects reset this to GET unless "strict_redirects" is set.
array$configConfiguration for this request instance http://pear.php.net/manual/en/package.http.http-request2.config.php

Definition at line 32 of file HttpRequest.php.

References HTTP_Request2\$config, HTTP_Request2\$method, HTTP_Request2\$url, and HttpRequest\setConfiguration().

Member Function Documentation

setConfiguration ( array  $config = array())

Sets the configuration for this object instance. Merges default values with provided $config and overrides all not provided values with those from $TYPO3_CONF_VARS

Parameters
array$configConfiguration options which override the default configuration
Returns
void
See Also
http://pear.php.net/manual/en/package.http.http-request2.config.php

Definition at line 47 of file HttpRequest.php.

References HTTP_Request2\$config, $GLOBALS, HTTP_Request2\setConfig(), and HTTP_Request2\setHeader().

Referenced by HttpRequest\__construct().