Last active
July 28, 2020 00:27
-
-
Save ivamluz/2838016bceb0a30b3c992bbe2b057ce6 to your computer and use it in GitHub Desktop.
Script for testing the HTTP-triggered deployed function
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/bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
SOURCE_DIR="${DIR}/../src" | |
source "${DIR}/.env.local" | |
TRIGGER_URL=$( | |
gcloud functions \ | |
describe ${FUNCTION_NAME_HTTP} \ | |
--format="value(httpsTrigger.url)" | |
) | |
ENDPOINT="${TRIGGER_URL}?subject=FooBar" | |
echo "Sending GET request to ${ENDPOINT}" | |
echo | |
curl -i $ENDPOINT | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment