Skip to content

FR: read response headers after function call #2280

@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;
  }

Activity

changed the title [-]FR: read response headers[/-] [+]FR: read response headers after function call[/+] on Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @afberg@google-oss-bot@rommelpe

        Issue actions

          FR: read response headers after function call · Issue #2280 · firebase/firebase-js-sdk