-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add smart_handler as the default for api.Client #1196
Conversation
@rochacbruno I do like this idea. To have a generic response_handler for Pulp 3 that the user does not need to know in advance what kind of status code, or a pagination will be part of the response. We need to test this to assure that we are not missing any edge case. What are about we call it generic_handler or general_handler? |
@kersommoura I suggest something like
|
@rochacbruno naming anything it is so hard. @bherrin3 can decide. |
In my mind the name has to show the intent...and the intent it is to be a general reponse_handler for Pulp 3. One that the user will pick in the cases that user does not know what response will get back from Pulp 3. But I am fine with any choice. |
@kersommoura if we want to show intent, then Like other tech examples:
We want to express the idea that This handler can make its own choice based on contextI vote for |
Or |
hmm.. I think you may already have the right name with Else, a method name that names the action is doing. I am not sure why this is post-pended with Using I don't have a |
Here's a good name: 😄 Why so serious? lets call it |
Lets stick with |
d293bd2
to
5d57e26
Compare
5d57e26
to
14fdbf6
Compare
14fdbf6
to
e4850ea
Compare
@rochacbruno, I am reviewing this one. Good job. Nice unittests. I updated the pagination test to use the |
@rochacbruno, it was an error on my side. I tested a few tests for Pulp 3 using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just suggestions. Not blockers.
This handler can decide which handler to use based on content response.
e4850ea
to
c15bf7c
Compare
This handler can decide which handler to use based
on content response.