Skip to content

Commit

Permalink
1.0.5
Browse files Browse the repository at this point in the history
CURLOPT_NOBODY to HttpUtils
  • Loading branch information
danielcmm committed Aug 29, 2016
1 parent be3bfb9 commit 5a2372c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.idea
.idea
.vendor
composer.lock
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "danielcmm/dutils",
"type": "library",
"version" : "1.0.4",
"version" : "1.0.5",
"description": "Simple Utility Classes",
"keywords": ["utility","currency","date","environment"],
"homepage": "https://github.com/danielcmm/DUtils",
Expand Down
4 changes: 3 additions & 1 deletion src/DUtils/HttpUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public static function get($url,$options = []){
"CURLOPT_RETURNTRANSFER" => 1,
"CURLOPT_HEADER" => 0,
"CURLOPT_CONNECTTIMEOUT" => 10,
"CURLOPT_TIMEOUT" => 15
"CURLOPT_TIMEOUT" => 15,
"CURLOPT_NOBODY" => 0
];

$options = array_merge($defaults,$options);
Expand All @@ -36,6 +37,7 @@ public static function get($url,$options = []){
curl_setopt($ch, CURLOPT_HEADER, $options['CURLOPT_HEADER']);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $options['CURLOPT_CONNECTTIMEOUT']);
curl_setopt($ch, CURLOPT_TIMEOUT, $options['CURLOPT_TIMEOUT']);
curl_setopt($ch, CURLOPT_NOBODY, $options['CURLOPT_NOBODY']);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

if (isset($options['gzip'])){
Expand Down

0 comments on commit 5a2372c

Please sign in to comment.