Hazaar\Http
Request
Summary
MethodsPropertiesConstants
No constants
Properties
$body
$body
$context
$context
$fsock_host
$fsock_host
$headers
$headers
$method
$method
$raw_uri
$raw_uri
$uri
$uri
Methods
__construct()
__construct($uri = null, $method = 'GET', $content_type = null, $custom_context = null)
addMultipart()
addMultipart($data, $content_type = null)
allowSelfSigned()
allowSelfSigned($value = true) : boolean
When using SSL communications, this allows the use of self-signed certificates.
authorisation()
authorisation($user, $type = null)
authorise()
authorise($username, $password)
Add Basic HTTP authentication

Basic authentication should ONLY be used over HTTPS.

Other methods are not yet supported, however Bearer is implemented using Request::authorization() method.

authorization()
authorization($user, $type = 'Bearer')
enableMultipart()
enableMultipart()
getBody()
getBody()
getHeader()
getHeader($key)
getHeaders()
getHeaders()
getHost()
getHost()
setBody()
setBody($body)
setContextOption()
setContextOption($options) : boolean
Wrapper function to the internal PHP function stream_context_set_option() function.

See http://php.net/manual/en/context.ssl.php documentation for all the available wrappers and options.

setHeader()
setHeader($key, $value, $allow_multiple = false)
setLocalCertificate()
setLocalCertificate($local_cert, $passphrase = null, $local_pk = null) : boolean
Set a local PEM encoded certificate to use for SSL communication
toString()
toString($encryption_key = null, $encryption_cipher = null)
uri()
uri($uri = null) : \Hazaar\Http\Uri
Summary of uri
verifyPeer()
verifyPeer($value = true) : boolean
When using SSL communications, this sets whether peer certificate verification is used.
verifyPeerName()
verifyPeerName($value = true) : boolean
When using SSL communications, this sets whether peer name verification is used.