Merged
Conversation
In v3 the API was `hosts: string[]`. It's easy to miss out on this in the migration guide, and it's also simpler to write just a string in the general case fixes #1188
redox
reviewed
Sep 7, 2020
redox
left a comment
There was a problem hiding this comment.
Not sure about the protocol, what do you think?
| export function createStatelessHost(options: HostOptions): StatelessHost { | ||
| if (typeof options === 'string') { | ||
| return { | ||
| protocol: 'https', |
There was a problem hiding this comment.
Do we need to force the protocol? I think I would rather keep not set the protocol key and let the regular business logic deal with it.
Contributor
Author
There was a problem hiding this comment.
this is the only place where protocol is set. If you set { url: xxx } the protocol will also be https. If you want a custom protocol you can use the object form as normal. Don't you think that most cases would be using https?
There was a problem hiding this comment.
I think https is a reasonable default here.
Also FMPOV the DX is better if createStatelessHost({url: xxx}) and createStatelessHost(xxx) have the same behavior
yannickcr
previously approved these changes
Sep 7, 2020
f23fbc9 to
a341934
Compare
yannickcr
approved these changes
Sep 7, 2020
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In v3 the API was
hosts: string[]. It's easy to miss out on this in the migration guide, and it's also simpler to write just a string in the general casefixes #1188