CFRequest

Wraps the underlying `RequestCore` class with some AWS-specific customizations.

Defined (1)

The class is defined in the following location(s).

/lib/SNS/utilities/request.class.php  
  1. class CFRequest extends RequestCore 
  2. /** 
  3. * The default class to use for HTTP Requests (defaults to <CFRequest>). 
  4. */ 
  5. public $request_class = 'CFRequest'; 
  6.  
  7. /** 
  8. * The default class to use for HTTP Responses (defaults to <CFResponse>). 
  9. */ 
  10. public $response_class = 'CFResponse'; 
  11.  
  12.  
  13. /**%******************************************************************************************%*/ 
  14. // CONSTRUCTOR 
  15.  
  16. /** 
  17. * Constructs a new instance of this class. 
  18. * @param string $url (Optional) The URL to request or service endpoint to query. 
  19. * @param string $proxy (Optional) The faux-url to use for proxy settings. Takes the following format: `proxy://user:pass@hostname:port` 
  20. * @param array $helpers (Optional) An associative array of classnames to use for request, and response functionality. Gets passed in automatically by the calling class. 
  21. * @return $this A reference to the current instance. 
  22. */ 
  23. public function __construct($url = null, $proxy = null, $helpers = null) 
  24. parent::__construct($url, $proxy, $helpers); 
  25.  
  26. // Standard settings for all requests 
  27. $this->add_header('Expect', '100-continue'); 
  28. $this->set_useragent(CFRUNTIME_USERAGENT); 
  29. $this->cacert_location = (defined('AWS_CERTIFICATE_AUTHORITY') ? AWS_CERTIFICATE_AUTHORITY : false); 
  30.  
  31. return $this;