Update curl_setopt()
This commit is contained in:
parent
947705cc3c
commit
cdbcfa8d09
2 changed files with 6 additions and 1 deletions
app/Models/Provider
|
@ -158,6 +158,8 @@ abstract class Driver extends Model
|
|||
return false;
|
||||
}
|
||||
|
||||
\curl_setopt($ch, \CURLOPT_MAXREDIRS, 10);
|
||||
\curl_setopt($ch, \CURLOPT_TIMEOUT, 10);
|
||||
\curl_setopt($ch, \CURLOPT_HTTPHEADER, ['Accept: application/json']);
|
||||
\curl_setopt($ch, \CURLOPT_POST, true);
|
||||
\curl_setopt($ch, \CURLOPT_POSTFIELDS, \http_build_query($params));
|
||||
|
|
|
@ -43,8 +43,11 @@ class GitHub extends Driver
|
|||
return false;
|
||||
}
|
||||
|
||||
\curl_setopt($ch, \CURLOPT_MAXREDIRS, 10);
|
||||
\curl_setopt($ch, \CURLOPT_TIMEOUT, 10);
|
||||
\curl_setopt($ch, \CURLOPT_HTTPHEADER, $headers);
|
||||
\curl_setopt($ch, \CURLOPT_POST, false);
|
||||
\curl_setopt($ch, \CURLOPT_HTTPGET, true);
|
||||
// \curl_setopt($ch, \CURLOPT_POST, false);
|
||||
\curl_setopt($ch, \CURLOPT_RETURNTRANSFER, true);
|
||||
\curl_setopt($ch, \CURLOPT_HEADER, false);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue