Curl -X in GET and POST request. Do I need -X?

Viewed 1037

In a project I have seen colleagues setting the -X parameter in a GET CURL request. I admit that I am not an expert and I had always fired my requests without this parameter. And it worked. I know about X that it stands for request. But nothing more.

Now my question. Is it necessary to include the X parameter and if so why?

curl GET http://localhost:3000/api/projects/ instead of curl -X GET http://localhost:3000/api/projects/.

1 Answers
Related