Skip to content

URL Test with cURL

Request Each Methods

GET

curl -X GET "<URL>"

POST

DATA='
{
    "key1": "value1",
    "key2": "value2"
}
'

curl -X POST \
    -H 'Content-Type: application/json' \
    -d "$(echo $DATA)" \
    "<URL>"

PUT

DATA='
{
    "key1": "value1",
    "key2": "value2"
}
'

curl -X PUT \
    -H 'Content-Type: application/json' \
    -d "$(echo $DATA)" \
    "<URL>"

DELETE

curl -X DELETE "<URL>"

cURL Options

Get HTTP Status Code

curl -o /dev/null -w "%{http_code}" "<URL>"

URL Test with Wget

Request URL silently

wget --spider -S "<URL>"

Create UUID (Random String)

uuidgen -r