Skip to content

Instantly share code, notes, and snippets.

@bhurlow
Last active October 30, 2021 19:05
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bhurlow/7418603 to your computer and use it in GitHub Desktop.
Save bhurlow/7418603 to your computer and use it in GitHub Desktop.
alias so you can pipe into curl to post json
#!/bin/bash
curl -X POST -d @- $1 --header "Content-Type:application/json"
# put jpost in usr/local/bin
# chmod -x jpost
# use like this
cat some.json | jpost localhost:3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment