-
Notifications
You must be signed in to change notification settings - Fork 131
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 a new class to handle Multipart requests #248
Conversation
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.
Regarding names, I think MultipartRequest
makes sense. I think we might be able to do better than ExtendedBaseRequest
- I know it's package private so not a huge deal, but as you add some JavaDoc to it maybe a more descriptive name will become obvious.
I also think the interface is fine, just add JavaDoc please ✍️
Regarding the exception types, let's connect later on this and discuss 👍
In general it looks good though, just a couple general points:
- I know our existing test coverage provides confidence in not introducing any breaking changes, but it would be good to double check and verify that there are no unintended breaking changes to any of the impacted public APIs, especially any changes to method signatures/exception types.
- JavaDocs 😄
Changes
Implements a new class to handle multipart requests. This is required before implementing the "import users" Job endpoint.
These multipart requests are only allowed for HTTP methods other than GET. Some of the shared logic between
CustomRequest
and the introducedMultipartRequest
has been moved up to a class namedExtendedBaseRequest
(as it's adding things on top ofBaseRequest
). This shared logic class is package-private!To review:
MultipartRequest
.FormDataRequest
interface.Testing
Check the commit history!! First, I added the new request class. Then I added tests for that. Then I added a few helper classes for the tests. Lastly, I refactored and extracted the common parts to the shared logic class.
Please, do check for public API breaking changes. There shouldn't be any, but is always good to have another pair of eyes 👀
Checklist