diff --git a/shitty_api.sh b/shitty_api.sh index d0b065d..f7bdd17 100755 --- a/shitty_api.sh +++ b/shitty_api.sh @@ -42,7 +42,7 @@ post(){ curl -s "$baseurl$1" --json "$(echo ${*:2} | jq .+{\"auth\":\"$TOKE\"})" put(){ curl -sX PUT "$baseurl$1" --json "$(echo ${*:2} | jq .+{\"auth\":\"$TOKE\"})"; } #Utils -getbody(){ a=$(cat); body=${a//\"/\\\"}; } +getbody(){ a=$(cat); b=${a//\"/\\\"}; while read n; do c="$c\n$n"; done <<< "$b"; body="${c:2}"; } actions="notifs notifs2 comments freepost shitpost follow unfollow home deref whoami login" #Endpoints.