Skip to content

http.onCall now sends raw header and body in the first parameter #947

Closed
@Acterion

Description

@Acterion

Related issues

[REQUIRED] Version info

node:
v14.17.3

firebase-functions:
3.15.2

firebase-tools:
9.10.0

firebase-admin:
9.11.0

[REQUIRED] Test case

// functions/index.ts

import * as functions from 'firebase-functions';

export const myCallable = functions.region("europe-west1").https.onCall(async data => {
  console.log(data);
});```

// myApp/api.ts
import firebase from "firebase/app";
import "firebase/functions";

const firebaseApp = firebase.initializeApp(eval(process.env.VUE_APP_FIREBASE_CONFIG!!));
const functions = firebaseApp.functions("europe-west1");
const callMyFunction = functions.httpsCallable('myCallable');

const result = "";
callMyFunction({text: "Some text"}).then(r => result = r);

[REQUIRED] Steps to reproduce

Call HTTP function from WebApp.

[REQUIRED] Expected behavior

Expected to see {text: "Some text"} in firebase console -> functions -> logs

[REQUIRED] Actual behavior

Screenshot 2021-08-13 at 18 00 04

It outputs a very long log of what seems to be header + body of a whole request.

Were you able to successfully deploy your functions?

Functions were deployed successfully without any error messages.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions