Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: read response headers after function call #2280

Open
afberg opened this issue Oct 18, 2019 · 0 comments
Open

FR: read response headers after function call #2280

afberg opened this issue Oct 18, 2019 · 0 comments

Comments

@afberg
Copy link

afberg commented Oct 18, 2019

[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;
  }
@afberg afberg changed the title FR: read response headers FR: read response headers after function call Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants