This repository has been archived by the owner on Feb 11, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
add support for user added headers in http requests #26
add support for user added headers in http requests #26
Changes from all commits
02c582a
6e2b1bb
99b6ab8
d4e328b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Maybe we should also provide users a way to set multiple headers? What do you think?
I think a very popular use case would be to have a standard set of headers which is used in multiple requests to an API.
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.
That will be handy indeed :).
We can plan to introduce 2 new apis in a later pr:
headers.setAll
that will take a map of header name and value.HttpClient
that all the initiatedHttpClientRequest
will use by default.These 2 APIs aren't part of
dart:io
as of now. But, will be a really nice addition to this package.Easy way of adding few common headers will be added via #27 to comply with
dart:io
apis.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.
Cool. 😀