mirror of
https://github.com/gnh1201/caterpillar.git
synced 2024-11-26 07:21:46 +00:00
Update index.php
This commit is contained in:
parent
0c0cbd5247
commit
8803fb7f05
|
@ -428,11 +428,11 @@ function relay_fetch_url($params) {
|
|||
}
|
||||
|
||||
// check it is POST request
|
||||
if ($method == "POST") {
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
||||
if ($data == "POST") {
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, array($data));
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
}
|
||||
|
||||
|
||||
// make cURL instance
|
||||
$response = curl_exec($ch);
|
||||
$error_code = curl_errno($ch);
|
||||
|
@ -666,4 +666,4 @@ if ($context['jsonrpc'] == "2.0") {
|
|||
"status" => 403,
|
||||
"message" => "Unsupported format"
|
||||
), "");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user