Note, this works perfectly when testing locally with Functions Framework.
I just deployed a function
Deploying function...
gcloud functions deploy quantumjs-api --runtime nodejs10 --trigger-http --project qunatumvue --region europe-west2
Deploying function (may take a while - up to 2 minutes)...done.
availableMemoryMb: 256
entryPoint: quantumjs-api
environmentVariables:
location: production
httpsTrigger:
url: https://europe-west2-qunatumvue.cloudfunctions.net/quantumjs-api
labels:
deployment-tool: cli-gcloud
name: projects/qunatumvue/locations/europe-west2/functions/quantumjs-api
runtime: nodejs10
Edit ---- thanks Doug Stevenson for the ping pointer
However, when posting data to it, I get no response back, just this error:
"Error: Network Error
at createError (webpack-internal:///./node_modules/axios/lib/core/createError.js:16:15)
at XMLHttpRequest.handleError (webpack-internal:///./node_modules/axios/lib/adapters/xhr.js:87:14)"
I figured out my issue, I had to redirect all traffic to https has thats what my domain stared with in the cors policy file