curl -F "file=@image.jpg" http://127.0.0.1:5001
$request = curl_init('http://127.0.0.1:5001/');
curl_setopt($request, CURLOPT_POST, true);
curl_setopt(
$request,
CURLOPT_POSTFIELDS,
array(
'file' => '@' . realpath('image.jpg')
)
);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
echo curl_exec($request);
curl_close($request);