I have been trying new firebase callable cloud functions in firebase functions:shell
I keep on getting following error
Request has incorrect Content-Type.
and
RESPONSE RECEIVED FROM FUNCTION: 400, {"error":{"status":"INVALID_ARGUMENT","message":"Bad Request"}}
Here is ho w I am trying to call this function on shell
myFunc.post(dataObject)
I have also tried this
myFunc.post().form(dataObject)
But then I get wrong encoding(form) error. dataObject
is valid JSON.
Update:
I figured that I need to use firebase serve
for local emulation of these callable https
functions. Data needs to be passed in post request like this(notice how its nested in data
parameter)
{
"data":{
"applicantId": "XycWNYxqGOhL94ocBl9eWQ6wxHn2",
"openingId": "-L8kYvb_jza8bPNVENRN"
}
}
What I can't figure still is how do I pass dummy auth info while calling that function via a REST client