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/sh | |
# param: $1="--retry" is a case for query once more when last query fails | |
send_api_request() { | |
query="${query} -H 'Authorization: Bearer ${access_token}'" | |
resp=`eval $query` | |
# echo -e "$query \n $resp" | |
# when the subshell process renews tokens and makes previous token deprecated, the above query will fail | |
# parse error: Invalid numeric literal at line 1, column 10 (jq has issue and throws an error here) | |
api_error_code=$(echo "${resp}" | jq --raw-output '.error.code') |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<style> | |
body { | |
margin: 0px; | |
padding: 0px; | |
} | |
</style> | |
</head> |