http
http copied to clipboard
WIP: Allow get user info from authority
This PR provides ability to get username and password (userinfo) from Authority
.
I proposed 3 ways:
- two functions
username()
andpassword()
- return new struct
UserInfo<'a>
- return tuple with 2 optional elements username and password.
Personally I would vote for 3 (Of course renamed to user_info).
TODO:
- [ ] Chose method that should be implemented.
user_info
user_info2
or pairusername
andpassword
and remove others. - [ ] Add tests to choose method(s)
- [ ] Add notation to doc about strongly discourage any use with reason that couldn't find in #12
Any update?
Please merge this PR. It's useful in many situations.
I proposed 3 different API, if crate maintainers are interested and decide witch one is best I am happy to implement it.
I think @seanmonstar is the main maintainer. If you think this is PR is not useful please close with a reason. Thanks.
In order to reduce communication delays, could you please resolve the conflict first? @xoac
I will wait for feedback from maintainers to do any work around this