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