예제 #1
0
 /**
  * Send request content.
  */
 protected function setContent()
 {
     $body = null;
     if ($this->request->hasContent()) {
         $body = $this->request->getContent();
     }
     if ($body !== null) {
         $this->resource->setOption(CURLOPT_POST, true);
         $this->resource->setOption(CURLOPT_POSTFIELDS, $body);
     }
 }
예제 #2
0
파일: FakeTask.php 프로젝트: weew/interop
 public static function fromHttpRequest(IHttpRequest $request)
 {
     $task = new self();
     $task->content = $request->getContent();
     return $task;
 }