Consider adding implicit conversions to/from string to HostString, QueryString and FragmentString
Open
area-networking
design-proposal
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
## Summary
`HostString` should have implicit conversions to and from `string`.
## Motivation and goals
`PathString` have implicit conversions to and from `string`.
I've found [code](https://github.com/dotnet/aspnetcore/blob/b795ac3546eb3e2f47a01a64feb3020794ca33bb/src/Middleware/Rewrite/src/RedirectToHttpsRule.cs#L33) that is boxing `HostSTring` and `QueryString`. The developer, probably, though that the implicit conversion existed.
# Detailed design
Implement the conversions like implemented for `PathString`.
Contributor guide
Assessment
This issue has not been assessed yet.