-
Notifications
You must be signed in to change notification settings - Fork 221
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
renames request info to request information #559
Conversation
7df0463
to
b269e78
Compare
@baywet I strongly recommend using
|
I might be biased here but to me "context" involves some kind of heavy object that's longed lived, but it's probably because of entity framework or the application context in winforms or the app insights telemetry context. |
You did describe it as an "...abstract HTTP request". If that description is correct, consider naming to mirror as you described it: For example, does it make sense to authenticate the RequestInformation object, or to authenticate the AbstractHttpRequest object? |
Thanks for the suggestion. Which leaves us with Request, which is probably going to conflict with a bunch of platform types. Any other suggestion? |
Another good candidate I had was RequestDetails, but it's a plural and I'm not sure it'll work for some naming conventions (thinking of java here) |
For better or worse, "context" objects have a pattern of providing both input and output as they contain the context around the operation. The request object should be kept purely as input. It also isn't abstract. Creating an instance of a class that is call abstractXYZ would be counter intuitive. What's the objection to requestInformation? Having an auth token as part of requestInformation seems fairly natural even though the name is quite long. |
The class is active with many methods, so it feels more than informative. It is nearly an HttpRequestMessage or a Fetch Request object, with some additional functionality. Yeah, we already define RequestContext for use in our middleware. This is different. I can't come up with another idea that doesn't degrade from RequestInformation or that doesn't start colliding with existing concepts. |
b269e78
to
63974f1
Compare
Kudos, SonarCloud Quality Gate passed! |
fixes #551
Generation Diff
microsoft/kiota-samples#244