Skip to content

FR: read response headers after function call #2280

Open
@afberg

Description

@afberg

[REQUIRED] Describe your environment

  • Operating System version: macOS Mojave 10.4.6
  • Browser version: Google Chrome 77.0.3865.120
  • Firebase SDK version: 7.0.0
  • Firebase Product: functions

[REQUIRED] Describe the problem

Steps to reproduce:

Perform any HttpsCallable function, ex:

const response = await functions.httpsCallable('myFirebaseFunction');

The response will then have all headers stripped. For debugging reasons it would be preferable if these could still be read. A possible solution could be to add extend HttpsCallableOptions with a property to preserve headers, like so:

const response = await functions.httpsCallable('myFirebaseFunction', {
    preserveHeaders: true
});
// index.d.ts
export interface HttpsCallableOptions {
    timeout?: number;
    preserveHeaders?: boolean;
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions