예제 #1
0
 /**
  * @param $body HTTP POST body data
  * @param $type content type, e.g. 'text/xml; charset=UTF-8'. Replaces any value for the
  * 'Content-Type' header that may have been set by another method.
  */
 public function setBody($body, $type)
 {
     PhpUtil::assertString($body, 'body');
     PhpUtil::assertString($type, 'type');
     $this->body = $body;
     $this->headers['Content-Type'] = $type;
 }
예제 #2
0
 /**
  * @param $cookieFile The name of the file containing the cookie data.
  * See CURLOPT_COOKIEFILE on http://php.net/curl_setopt .
  */
 public function setCookieFile($cookieFile)
 {
     PhpUtil::assertString($cookieFile, 'cookieFile');
     $this->cookieFile = $cookieFile;
 }
예제 #3
0
 /**
  * @param $file (string) file path
  */
 public function __construct($file)
 {
     PhpUtil::assertString($file, 'file');
     $this->file = $file;
 }