We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fda3c6e commit e903d57Copy full SHA for e903d57
src/Curl/Curl.php
@@ -58,7 +58,8 @@ public function get($url, $data = array()) {
58
public function post($url, $data=array()) {
59
$this->setopt(CURLOPT_URL, $url);
60
$this->setopt(CURLOPT_POST, TRUE);
61
- $this->setopt(CURLOPT_POSTFIELDS, http_build_query($data));
+ $data = http_build_query($data);
62
+ $this->setopt(CURLOPT_POSTFIELDS, $data);
63
$this->_exec();
64
}
65
tests/CurlTest.php
@@ -93,7 +93,7 @@ public function testPostFilePathUpload() {
93
94
$data = array(
95
'key' => 'image',
96
- 'image' => $image,
+ 'image' => $image . ';filename=test.png;type=image/png',
97
);
98
99
$this->curl->post($this->test_url . 'post_file_path_upload.php', $data);
0 commit comments