diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-08-11 18:27:01 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-08-11 18:27:01 +0200 |
commit | 8786eeac017c2247daebbcc57b0cf5594f25986a (patch) | |
tree | 2af0a2d005ed76f1b34a892ea595e59a30b6d4ea | |
parent | 3ec7aef28c5523d15f7c677ab29dfc30b3b5fc2f (diff) |
make curlopts and useragent global variables
Needed for apikey patch.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | fb.in | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -50,6 +50,8 @@ display_history= clipboard="" exitcode=0 debug= +useragent="fb-client/shell-$version" +default_curlopts="-# -L -A $useragent --speed-time 30 --speed-limit 1 --connect-timeout 10" base64_encode() { if type base64 2>&1 >/dev/null; then @@ -88,8 +90,9 @@ request_helper() { $libdir/fb-helper $helperopts -u "$url" -f "$file" fi else - useragent="fb-client/shell-$version" - curlopts="-# -L -A $useragent --speed-time 30 --speed-limit 1 --connect-timeout 10" + curlopts="$default_curlopts" + + require_executable curl if [ -e "$apikey_file" ]; then curlopts="$curlopts --data-urlencode 'apikey@$apikey_file'" |