-
-
Notifications
You must be signed in to change notification settings - Fork 598
Add client builder #480
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
Merged
Merged
Add client builder #480
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
86d9d00
Added HTTP Client Builder
Nyholm 51ba284
Bugfixes
Nyholm 7153101
Added changelog
Nyholm f2b1a77
Removed support for default headers in the builder
Nyholm 02b38a2
minor
Nyholm 3fe4dbc
Making builder final
Nyholm bd2dd41
removed final
Nyholm 461f27b
Updating docs for new constructor
Nyholm fa4d1d9
Updated docs
Nyholm a8f60a1
Style fix
Nyholm 511775a
Added http client to constructor
Nyholm c915187
Fixed tests and docs
Nyholm 3160b9c
Adding a factory class
Nyholm 38ceb97
Updated changelog
Nyholm 0efb593
Renamed to createWithHttpClient
Nyholm d7cde53
Updated changelog
Nyholm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
IMO it's better to leave old constructor and create new builder inline or support both.
Uh oh!
There was an error while loading. Please reload this page.
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 keep the old constructor indeed but deprecated it (throw deprecation warning) and use the new constructor in 3.0. Or you could say use the new constructor from now on as 2.0 stable is not yet released
Uh oh!
There was an error while loading. Please reload this page.
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.
My idea is that client should always be constructed without extra manipulations, i.e.
maybe static factory can be a possible solution.
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.
You are right about that, it should be a simple as possible to instantiate and use the client
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.
I did not like the new constructor myself to be honest. Should I add another constructor argument with the builder?