-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(client): add patch method to Client builder interface #659
Conversation
I don't mean to be argumentative, I really do appreciate the PRs. I just want to talk through this first. It seems like a tiny amount of code, who cares, but it slowly expands the surface area of the API (and the documentation). So, is it awkward to have to use I could just be being an unintentional jerk, and should just merge this. |
I totally get the thing about expanding surface area and documentation. From a library user's perspective though, I'd say it's not awkward because If the other HTTP method helpers were added as "convenience", at some point, I'd assume it was decided that In particular, I'm interface with Github's api which uses PATCH extensively, if not exclusively, for partial updates to resources. |
I'm also not trying to be argumentative. I'm just trying to provide a consistent experience for future hyper users :) |
My 2c: I would not mind adding a convenience for |
I wasn't worried about maintenance, but rather "when a user goes to the Client doc page, does extra convenience methods help, or provide noise." As in, do the convenience methods pull their weight. I'll merge this, but just wanted to bring it up since I imagine a similar PR adding a method for the |
feat(client): add patch method to Client builder interface
It's definitely a legitimate concern generally speaking, but I think it is worth it in this case. |
If its of any value it was the lack of a doc for this method that forced me to read through the source code to figure out the method didn't actually exist. As a user, it just felt like it should exist. |
Oh? Interesting. My initial reaction when using any method thats not one of the big 4 (get, post, put, delete) is to look for the method that lets me specify the exact method I want... |
It's that kind of inconsistency that makes it's absence feel awkward. |
thanks @seanmonstar ! |
I'm building a client interface on top of hyper for an rest API that makes use of the HTTP PATCH method. It felt a little awkward that there were methods for
get
post
anddelete
but notpatch
so I wanted to make it less awkward for others.