I'm making a restful api call, but I'm getting an error.
Warning: Invalid character is found in given range. A specified range MUST
Warning: have only digits in 'start'-'stop'. The server's response to this
Warning: request is uncertain.
HTTP/1.1 200 OK
Date: Thu, 22 Aug 2013 17:43:19 GMT
Server: Apache
Content-Length: 208
Allow: GET, HEAD, POST
Vary: Authorization
Content-Type: application/json
Has anyone seen this WARNING error before about an invalid character? How do I fix it?
I was calling:
curl https://my/url/for/api --include -H "Content-Type:application/json" -request POST '{ \"type\": \"code\", \"objects\" : [ \"123456\" ] } ' -u user:pass
More info:
extra response at the end of return
curl: (6) Could not resolve host: POST; nodename nor servname provided, or not known
curl: (3) [globbing] nested braces not supported at pos 33
I had a similar situation - my curl
request was essentially working, and returning the information I needed, but with warnings, using the following code:
curl -request http://...
It turned out to be the -request
parameter, which I'd incorrectly typed. It either needs to be something like:
curl --request GET http://...
or simply not there at all (because GET is the default):
curl http://...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With