# CURL
Here are a few sample commands.
curl http://example.com
curl http://example.com:3000
curl username:password@http://example.com
curl --head http://example.com
curl http://example.com?name1=value1&name2=value2
curl --data-urlencode "name1=value1&name2=value2" http://example.com
curl -X PUT http://example.com
curl --header "Content-Type: application/json" http://www.example.com
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
They are, in order:
- Basic GET Request for a domain.
- Basic GET Request for a domain with a specific port.
- Basic GET Request that requires a username and password.
- Request only the headers be returned.
- GET Request with querystring data being sent.
- POST Request with data being sent.
--data
works too but it will not encode the information being sent. - PUT Request. Use this approach when you need a method other than GET or POST.
- Basic GET Request with a header being set.