[SOLVED] Rest API called by Ubuntu 14.04 curl

Hello,
I have a problem with the Rest API.
If I use the API inside (http://127.0.0.1:8080/doc/index.html)
following curl statement is generated and this works well (beside not documented response of 202):
curl -X PUT --header “Content-Type: text/plain” --header “Accept: application/json” -d “2” “http://127.0.0.1:8080/rest/items/png_pres_mifune/state
If I try this command from local ubuntu command line (or other commands I expected to work too) this does not work. It results in a html page containing:
…Request Error (invalid_request)
…Your request could not be processed. Request could not be handled
…This could be caused by a misconfiguration, or possibly a malformed request.
…For assistance, contact your network support team.

So how is the correct curl command line outside the openhab2 environment?

Thanks in advance …

The proxy was my problem.
This works for me: curl --verbose --noproxy ‘*’ --header “Content-Type: text/plain” --header “Accept: application/json” -d 1 http://127.0.0.1:8080/rest/items/png_pres_mifune