Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why my curl command responds successfully, and wget command return 405 response?

I am executing two commands as follows:

curl http://somehost:port/endpoin

this return me successful response.

Whereas if I execute the same command with wget as follows:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

wget --spider -S http://somehost:port/endpoint

this gives me a 405 Method not allowed error.

If I simply do wget http://somehost:port/endpoint I can downoad the file successfully.

Can someone help me understand the issue?

>Solution :

When you run this command

curl http://somehost:port/endpoin

It sends request GET method.

But another one use HEAD method. So that service may only allows GET method and deny others.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading