cURL - command line tool and library for transferring data with URLs. Available for most of platforms.

  • Linux - can be installed with package installer.
  • macOS - Homebrew or MacPorts
  • Windows - download binary file and unpack it to some directory and add it to PATH.


curl -H "Content-Type: application/json" -X POST -d <body> <link>

curl -H "Content-Type: application/json" -X POST -d '{"username": "test", "content": "hello"}'

# -H "Content-Type: application/json" - header that tells server that you are sending JSON data
# -X POST - use POST method
# -d '{"username": "test", "content": "hello"}' - adds data to request
curl -H "Content-Type: application/json" \
-d '{"username": "test", "content": "hello"}' $url
# you can make command multiline using backslash `\` and set url as variable
# so you don't need to paste it again and again. As option you can add it to your `.*rc` file