Skip to content

Commit 38618df

Browse files
authored
Merge pull request #12 from nguyenanhung/develop
Fix lỗi setHeader và setCookie bị lộn trong hàm curlRequest
2 parents 1c68e5a + b1dd8d3 commit 38618df

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Interfaces/ProjectInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
*/
1818
interface ProjectInterface
1919
{
20-
const VERSION = '0.1.3.5';
21-
const LAST_MODIFIED = '2018-10-10';
20+
const VERSION = '0.1.3.6';
21+
const LAST_MODIFIED = '2018-10-11';
2222
const MIN_PHP_VERSION = '5.3';
2323
const GET = 'GET';
2424
const HEAD = 'HEAD';

src/MyRequests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,12 +836,12 @@ public function curlRequest($url = '', $data = [], $method = 'GET')
836836
}
837837
if (is_array($this->headers) && count($this->headers) > 0) {
838838
foreach ($this->headers as $key => $value) {
839-
$curl->setCookie($key, $value);
839+
$curl->setHeader($key, $value);
840840
}
841841
}
842842
if (is_array($this->cookies) && count($this->cookies) > 0) {
843843
foreach ($this->cookies as $key => $value) {
844-
$curl->setHeader($key, $value);
844+
$curl->setCookie($key, $value);
845845
}
846846
}
847847
if ($this->basicAuthentication) {

0 commit comments

Comments
 (0)