You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, it would certainly solve a lot of headaches if the SDK method call did not begin with the word 'GET'. The only error message I was able to get was 'INTERNAL' in the Unity editor, or 'Not Valid JSON' when building to device, and as a result took some time to debug.
After creating a duplicate route with 'post' alongside my 'get' route, the call began to work as expected:
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
I am using Firebase Functions with Express routing set up, e.g. in my index.ts file (external to the Unity project):
api.get("/products", helloWorld);
When I call this route within my Unity project, using GetHttpsCallable in a C# file:
var func = _firebaseFunc.GetHttpsCallable("api/products");
It turns out a POST request is sent by default (using SmartSniff)
From reading about this (StackOverflow 1, 2) it seems this is intended behaviour - Firebase cloud functions indeed only accept POST requests: https://firebase.google.com/docs/functions/callable-reference
However, it would certainly solve a lot of headaches if the SDK method call did not begin with the word 'GET'. The only error message I was able to get was 'INTERNAL' in the Unity editor, or 'Not Valid JSON' when building to device, and as a result took some time to debug.
After creating a duplicate route with 'post' alongside my 'get' route, the call began to work as expected:
Steps to reproduce:
As above
Relevant Code:
As above
The text was updated successfully, but these errors were encountered: