2 Commits

2 changed files with 7 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ set -euo pipefail
API_URL="https://jmespath-playground.koszewscy.waw.pl"
JSON_FILE="-"
ADD_HEADERS=()
function usage() {
echo "Usage: $0 [--api-url <url>] [--json-file <file>]"
@@ -16,6 +17,10 @@ while [[ $# -gt 0 ]]; do
API_URL="$2"
shift 2
;;
--api-key)
ADD_HEADERS+=("-H" "X-API-Key: $2")
shift 2
;;
--json-file)
JSON_FILE="$2"
shift 2
@@ -36,6 +41,7 @@ done
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
"${ADD_HEADERS[@]}" \
--data @${JSON_FILE} \
"$API_URL/api/v1/upload"

View File

@@ -1,6 +1,6 @@
{
"name": "jmespath-playground",
"version": "1.2.0",
"version": "1.2.1",
"description": "A React-based web application for testing JMESPath expressions against JSON data",
"main": "index.js",
"scripts": {