Skip to content

Commit

Permalink
CurlFile posibility added in RequestBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciuspugliese committed Jan 31, 2018
1 parent 9b80ffd commit 8cc018e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Http/RequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public function send()
curl_setopt($curl, CURLOPT_POSTFIELDS, $this->getData());
}

if ($this->getFileData()) {
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $this->getFileData());
}

$data = curl_exec($curl);
$info = curl_getinfo($curl);

Expand Down

0 comments on commit 8cc018e

Please sign in to comment.