Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 6
feat: adding a new harIsAlreadyEncoded option#46
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
81171380f888455c4f2ca6a7b774File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| const fetch = require('node-fetch'); | ||
| const url = 'http://mockbin.com/har'; | ||
| const options = {method: 'POST', headers: {cookie: 'foo=bar; bar=baz; '}}; | ||
MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool side effect of this work is now cookies for | ||
| const options = {method: 'POST', headers: {cookie: 'foo=bar; bar=baz'}}; | ||
| fetch(url, options) | ||
| .then(res => res.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.
What are the implications of consuming
allHeadersinstead ofheadersObj?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.
allHeaderscontains thecookieheader if it's present,headersObjis a k/v store of headers from the HAR excludingcookiebecause that's dynamically generated from thecookiesarray in the HAR.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.
And by changing this to
allHeadersthis target no longer needs to combine its own cookie data into acookieheader because that's already been done insrc/index.js.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.
Love it, thanks for the explanation!