nb_api() {
local uri="$1"; shift
+ #echo "https://api.nbdom.net$uri $@"; return 0;
if [ -z "$NB_AUTH" -o x = x$(awk '/^machine api.nbdom.net / { print $4":"$6}' $HOME/.netrc 2> /dev/null) ]; then
- curl -su "$NB_AUTH" "https://api.nbdom.net$uri" "$@"
+ curl -sfS -u "$NB_AUTH" "https://api.nbdom.net$uri" "$@"
else
- curl -s --netrc-optional "https://api.nbdom.net$uri" "$@"
+ curl -sfS --netrc-optional "https://api.nbdom.net$uri" "$@"
fi
}
fi
(
eval "$(eval "$curl")" #&& echo "$table: $rowCount: $args"
+ #eval "$curl" #&& echo "$table: $rowCount: $args"
)
}
public function not_found($admin_msg='') {
header('Content-type: text/plain');
$msg = '404 Not Found';
+ #$msg = '510 Not Implemented';
+ $msg = '400 Bad Request';
if (empty($_SERVER['SERVER_PROTOCOL'])) $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0';