Last active
October 30, 2021 19:05
-
-
Save bhurlow/7418603 to your computer and use it in GitHub Desktop.
alias so you can pipe into curl to post json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -X POST -d @- $1 --header "Content-Type:application/json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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