tut-rest
tut-rest copied to clipboard
Error: java.lang.IllegalArgumentException: Invalid character found in method name [] . HTTP method names must be tokens
I had the same problem using Eclipse STS.
Mozilla Error:
Simple fix:
It has to do with using http//: instead of https//: e.g.
Employee API makes the following call:
$ curl -v localhost:8080/employees
or
$ curl -v https://localhost:8080/employees
Orders API makes the following call:
$ curl -v http://localhost:8080/orders
Essentially, swapping "http" with "https", when testing your API end points, will fix the problem.
😎
Hi @AAdewunmi. What error do you get when you run the curl commands from a terminal or command prompt? The error I see is from Mozilla and Eclipse STS which puts another layer in between the request and the response. When I went through the tutorial it worked with the commands as is, but did not work with https
.
Hi @AAdewunmi. Have you had the chance to look into this further? I'll leave this issue open for a bit longer but will close it soon if I don't hear back. Let me know if the issue persists.
Hi @robertmcnees, issue has been fixed, thanks.