Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is this error: curl: (26) read function returned funny value parse error: premature EOF

Tags:

rest

curl

When executing underneath, i get this error and i do not find much online about it.

[user@vm itop_api]$ curl -k -K curlopt.txt -X POST -F 'version=1.3' https://vma04.domain/webservices/rest.php -F 'json_data=@./get_server2a.json' |json_reformat

Warning: setting file ./get_server2a.json  failed!
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   272    0     0    0   272      0   9714 --:--:-- --:--:-- --:--:--  9379

curl: (26) read function returned funny value
parse error: premature EOF
    
                         (right here) ------^

like image 558
dfs Avatar asked Nov 02 '25 03:11

dfs


1 Answers

After double checking all values entered, while making this post, i just realised the actual file json_data=@./get_server2a.json does not exist.

Maybe this helps somebody running into the same silly mistake.

like image 175
dfs Avatar answered Nov 04 '25 16:11

dfs



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!