|
| __construct ($oauthOptions, $uri=null, $config=null) |
| Constructor; creates a new HTTP Client instance which itself is just a typical Zend_Http_Client subclass with some OAuth icing to assist in automating OAuth parameter generation, addition and cryptographioc signing of requests.
|
|
| setAdapter ($adapter) |
| Load the connection adapter.
|
|
| setStreamingRequest ($value) |
| Set the streamingRequest variable which controls whether we are sending the raw (already encoded) POST data from a stream source.
|
|
| getStreamingRequest () |
| Check whether the client is set to perform streaming requests.
|
|
| resetParameters ($clearAll=false) |
| Clear all custom parameters we set.
|
|
| setRawDataStream ($data, $enctype=null) |
| Set the raw (already encoded) POST data from a stream source.
|
|
| setMethod ($method=self::GET) |
| Same as Zend_Http_Client::setMethod() except it also creates an Oauth specific reference to the method type.
|
|
| request ($method=null) |
| Same as Zend_Http_Client::request() except just before the request is executed, we automatically append any necessary OAuth parameters and sign the request using the relevant signature method.
|
|
| prepareOauth () |
| Performs OAuth preparation on the request before sending.
|
|
| __call ($method, array $args) |
| Simple Proxy to the current Zend_Oauth_Config method.
|
|
| __construct ($uri=null, $config=null) |
| Constructor method.
|
|
| setUri ($uri) |
| Set the URI for the next request.
|
|
| getUri ($as_string=false) |
| Get the URI for the next request.
|
|
| setConfig ($config=array()) |
| Set configuration parameters for this HTTP client.
|
|
| setMethod ($method=self::GET) |
| Set the next request's method.
|
|
| setHeaders ($name, $value=null) |
| Set one or more request headers.
|
|
| getHeader ($key) |
| Get the value of a specific header.
|
|
| setParameterGet ($name, $value=null) |
| Set a GET parameter for the request.
|
|
| setParameterPost ($name, $value=null) |
| Set a POST parameter for the request.
|
|
| getRedirectionsCount () |
| Get the number of redirections done on the last request.
|
|
| setAuth ($user, $password= '', $type=self::AUTH_BASIC) |
| Set HTTP authentication parameters.
|
|
| setCookieJar ($cookiejar=true) |
| Set the HTTP client's cookie jar.
|
|
| getCookieJar () |
| Return the current cookie jar or null if none.
|
|
| setCookie ($cookie, $value=null) |
| Add a cookie to the request.
|
|
| setFileUpload ($filename, $formname, $data=null, $ctype=null) |
| Set a file to upload (using a POST request)
|
|
| setEncType ($enctype=self::ENC_URLENCODED) |
| Set the encoding type for POST data.
|
|
| setRawData ($data, $enctype=null) |
| Set the raw (already encoded) POST data.
|
|
| setUnmaskStatus ($status=true) |
| Set the unmask feature for GET parameters as array.
|
|
| getUnmaskStatus () |
| Returns the currently configured unmask status.
|
|
| resetParameters ($clearAll=false) |
| Clear all GET and POST parameters.
|
|
| getLastRequest () |
| Get the last HTTP request as string.
|
|
| getLastResponse () |
| Get the last HTTP response received by this client.
|
|
| setAdapter ($adapter) |
| Load the connection adapter.
|
|
| getAdapter () |
| Load the connection adapter.
|
|
| setStream ($streamfile=true) |
| Set streaming for received data.
|
|
| getStream () |
| Get status of streaming for received data.
|
|
| request ($method=null) |
| Send the HTTP request and return an HTTP response object.
|
|
|
static | encodeFormData ($boundary, $name, $value, $filename=null, $headers=array()) |
|
static | encodeAuthHeader ($user, $password, $type=self::AUTH_BASIC) |
| Create a HTTP authentication "Authorization:" header according to the specified user, password and authentication method.
|
|
const | GET = 'GET' |
| HTTP request methods.
|
|
const | POST = 'POST' |
|
const | PUT = 'PUT' |
|
const | HEAD = 'HEAD' |
|
const | DELETE = 'DELETE' |
|
const | TRACE = 'TRACE' |
|
const | OPTIONS = 'OPTIONS' |
|
const | CONNECT = 'CONNECT' |
|
const | MERGE = 'MERGE' |
|
const | PATCH = 'PATCH' |
|
const | AUTH_BASIC = 'basic' |
| Supported HTTP Authentication methods.
|
|
const | HTTP_1 = '1.1' |
| HTTP protocol versions.
|
|
const | HTTP_0 = '1.0' |
|
const | CONTENT_TYPE = 'Content-Type' |
| Content attributes.
|
|
const | CONTENT_LENGTH = 'Content-Length' |
|
const | ENC_URLENCODED = 'application/x-www-form-urlencoded' |
| POST data encoding methods.
|
|
const | ENC_FORMDATA = 'multipart/form-data' |
|
const | VTYPE_SCALAR = 'SCALAR' |
| Value types for Body key/value pairs.
|
|
const | VTYPE_FILE = 'FILE' |
|
static | _flattenParametersArray ($parray, $prefix=null) |
| Convert an array of parameters into a flat array of (key, value) pairs.
|
|
static | $_fileInfoDb = null |
|