Skip to content

Commit

Permalink
Merge pull request #12 from nguyenanhung/develop
Browse files Browse the repository at this point in the history
Fix lỗi setHeader và setCookie bị lộn trong hàm curlRequest
  • Loading branch information
nguyenanhung authored Oct 11, 2018
2 parents 1c68e5a + b1dd8d3 commit 38618df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Interfaces/ProjectInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/
interface ProjectInterface
{
const VERSION = '0.1.3.5';
const LAST_MODIFIED = '2018-10-10';
const VERSION = '0.1.3.6';
const LAST_MODIFIED = '2018-10-11';
const MIN_PHP_VERSION = '5.3';
const GET = 'GET';
const HEAD = 'HEAD';
Expand Down
4 changes: 2 additions & 2 deletions src/MyRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -836,12 +836,12 @@ public function curlRequest($url = '', $data = [], $method = 'GET')
}
if (is_array($this->headers) && count($this->headers) > 0) {
foreach ($this->headers as $key => $value) {
$curl->setCookie($key, $value);
$curl->setHeader($key, $value);
}
}
if (is_array($this->cookies) && count($this->cookies) > 0) {
foreach ($this->cookies as $key => $value) {
$curl->setHeader($key, $value);
$curl->setCookie($key, $value);
}
}
if ($this->basicAuthentication) {
Expand Down

0 comments on commit 38618df

Please sign in to comment.