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
get_method, get_uri on request::Builder #282
Comments
On one hand, it certainly seems reasonable to want to view what fields have already been set. On the other, I can't remember any other builder patterns where getters are included... |
https://en.wikipedia.org/wiki/Builder_pattern C# builder having getter. because C# property MUST have getter. C++,Java,etc builder not having getter.
in Rust, Builder consumed on first line build() and ends life. last line build() to make compilation error.
IMHO |
I've wanted this every so often. I would be fine with having |
Though, if we are to bikeshed a bit, generally Rust doesn't have I'm leaning towards just adding |
Thank you ,
Yes, and Yes, |
Merged! 🎉 |
I am writing Azure Storage REST Client and implementing Authorize with Shared Key. To create signatures, I need HTTP Method(VERB) , header values, and request URI on the current request. (See Blob, Queue, and File Services (Shared Key authorization))
I wish to add functions to
request::Builder
get_method
get_uri
get_headers
then I can implement sign_request as bellow
Can you accept if I send changes?
Or is there any security reason that
request::Builder
shouldn't provide HTTP method etc?The text was updated successfully, but these errors were encountered: