I have a Web API and it works fine when I send get requests to it using Postman. For example, the API can handle this request:
http://localhost:5000/api/test/?id=23
When I try the same exact thing with curl ($ curl http://localhost:5000/api/test/?id=23
), I get this error:
curl: (3) URL using bad/illegal format or missing URL
What is wrong here?
Probably your app supports only POST requests?
curl http://localhost:5000/api/test/?id=23
will send GET request.Try
If that does not work, the reason is probably in request headers, cookies, or (unlikely) user-agent handling in the API.