fixed array instead of raw form-data
This commit is contained in:
parent
94685a0210
commit
1b17ab8d38
|
@ -46,7 +46,7 @@
|
|||
|
||||
if( is_null($data) ){
|
||||
slog("api:fetch returned unreadable content", 'api:sync');
|
||||
$data = "{}";
|
||||
$data = [];
|
||||
}
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
|||
/* (1) Set post data */
|
||||
$postarray = [
|
||||
'token' => $hash,
|
||||
'data' => $data
|
||||
'data' => json_encode($data)
|
||||
];
|
||||
|
||||
/* (2) Add renew if renew */
|
||||
|
@ -90,10 +90,9 @@
|
|||
|
||||
/* [4] Manage headers
|
||||
=========================================================*/
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, [
|
||||
"Content-Type: multipart/form-data; boundary=$boundary",
|
||||
"Content-Length: ".strlen($postraw)
|
||||
]);
|
||||
#curl_setopt($curl, CURLOPT_HTTPHEADER, [
|
||||
# "Content-Type: multipart/form-data"
|
||||
#]);
|
||||
|
||||
|
||||
/* [5] Send and catch request response
|
||||
|
|
Loading…
Reference in New Issue