Last active
November 14, 2019 16:40
-
-
Save jesopo/3a4c3c87324cac1d2f33c9f471935150 to your computer and use it in GitHub Desktop.
Bash script for requesting and pretty-printing ActivityPub URLs. Requires https://stedolan.github.io/jq/
This file contains hidden or 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 | |
CONTENT_FILE=`mktemp` | |
# write headers directly to stdout ("-D-") | |
# write content to temp file to later pass through |jq ("-o $CONTENT_FILE") | |
curl -D- -s -H "Accept: application/activity+json" "$1" -o $CONTENT_FILE | |
cat $CONTENT_FILE | jq | |
rm $CONTENT_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment