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

Add comment documenting makeRequest#headers type. #1325

Merged
merged 1 commit into from
Jan 10, 2022
Merged

Conversation

dcr-stripe
Copy link
Contributor

@dcr-stripe dcr-stripe commented Jan 10, 2022

r? @richardm-stripe

Summary

Adds a comment documenting why HttpClient#makeRequest(headers) doesn't use a stricter type. Unfortunately this is implementation-specific and enforcing a stricter type could break some integrations.

As examples, we cannot just use {[key: string]: string} since:

  1. Node actually supports {[key: string]: string | number | string[]}
  2. Fetch actually also supports string[][] as well as a Headers object.

@dcr-stripe dcr-stripe merged commit 44d65a1 into master Jan 10, 2022
@dcr-stripe dcr-stripe deleted the dcr-add-comment branch January 10, 2022 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants