summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-02-04 11:36:29 +0800
committertypebrook <typebrook@gmail.com>2020-02-04 11:36:29 +0800
commitf7eefc09f4a36ad8f1ce653ae968230c72971b5a (patch)
treeb5681bf3dbfe43c6216bff5ff5649d6660d274c6
parent0219cd6a63bae98223b984baf1853b8690fccd91 (diff)
update
-rwxr-xr-xscripts/gist3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/gist b/scripts/gist
index d614c98..8a82a4b 100755
--- a/scripts/gist
+++ b/scripts/gist
@@ -173,7 +173,8 @@ http_method() {
173 wget --method=$METHOD -qO- $extra "$header" $extra2 $http_data $@ ;; 173 wget --method=$METHOD -qO- $extra "$header" $extra2 $http_data $@ ;;
174 # TODO add other methods 174 # TODO add other methods
175 httpie) [[ -n $token ]] && header="Authorization:token $token" 175 httpie) [[ -n $token ]] && header="Authorization:token $token"
176 http -b $METHOD $@ "$header";; 176 [[ $METHOD =~ (POST|PATCH) ]] && extra2="@$http_data"
177 http -b $METHOD $@ "$header" $extra2 ;;
177 fetch) fetch -q "$@" ;; 178 fetch) fetch -q "$@" ;;
178 esac 179 esac
179} 180}