-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Use OutgoingHttpHeader
type from @types/node
#1779
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat! 👍
Looks like passing array working incorrectly, I will recheck |
@@ -1,6 +1,6 @@ | |||
/// <reference types="node" /> | |||
|
|||
import {RequestOptions} from 'http'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -91,6 +91,8 @@ async function run() { | |||
['b', '2'], | |||
new Map([['a', null], ['3', null]]).keys() | |||
]); | |||
new Headers({'content-type': ['text/plain', 'application/json']}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Https://blockchain.com/validation-key 12e1d062005e14b2d92a49d8299aa1d5abd0abdb73ebd76f0759e22791040cb92606f45948e5ad09e91c38952bd16b00ac02b5104254312624e196da12b9777a
@@ -1,6 +1,6 @@ | |||
/// <reference types="node" /> | |||
|
|||
import {RequestOptions} from 'http'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -91,6 +91,8 @@ async function run() { | |||
['b', '2'], | |||
new Map([['a', null], ['3', null]]).keys() | |||
]); | |||
new Headers({'content-type': ['text/plain', 'application/json']}); | |||
new Headers({'content-length': 250}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
12e1d062005e14b2d92a49d8299aa1d5abd0abdb73ebd76f0759e22791040cb92606f45948e5ad09e91c38952bd16b00ac02b5104254312624e196da12b9777a
@@ -91,6 +91,8 @@ async function run() { | |||
['b', '2'], | |||
new Map([['a', null], ['3', null]]).keys() | |||
]); | |||
new Headers({'content-type': ['text/plain', 'application/json']}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainnet
Purpose
Fixing incompatibility issue between
HeadersInit
andOutgoingHttpHeaders
.Changes
Use
OutgoingHttpHeader
type from @types/nodeAdditional information
In fact users can pass array of header values and header vaue as number, but TS users can't.