Getting full HTTP request from website I am doing a project in which my Arduino needs to connect to a simple web page and retrieve the content of a text file. I want to use curl to see the response I would get if I sent the following HTTP request once connected to example.com (the website in my actual project is a different one) so that I can devise a parse for the contents of commandPage.txt:

GET /commandPage.txt HTTP 1.1
Host: example.com
Connection: close


How can I use curl to send the request and see the full response?
What you're asking for is simply:

curl http://example.com/commandPage.txt


This will get you the contents of that URL.

If you need to see the headers as well, you can add -v.

Otherwise, you can even use telnet to do so. Just use:

telnet example.com 80


And paste the full request as quoted above, followed by one empty line.