adoroszlai commented on PR #9537: URL: https://github.com/apache/ozone/pull/9537#issuecomment-3678529311
Thanks @ivandika3, @rich7420 for the review. I have updated the patch to translate to `WebApplicationException(400)`, but stopped using `ConfigurationSource`, has too much unnecessary baggage for this. > I'm wondering whether instead of a single long method for handling PUT, GET (e.g. `ObjectEndpoint#put`) we can divide a single endpoint to multiple methods and let the JAX-RS implementation (Jersey) matcher router the most appropriate ones ... For example, for `ObjectEndpoint#put`, we can divide to `putObject`, `putObjectTagging`, `createMultipartKey` based on whether certain headers appear (e.g. ACL header, multipart header). We do have two handlers for `POST` based on content type (`@Consumes`). I'm not very familiar with Jersey, but looking into the docs I haven't found how to do the same based on headers or query params. Would be great if it's possible. Assuming we have to roll our own, I'd like to: - define handler for each request as you describe, but in separate objects - reduce the current long methods into a loop to delegate to the handlers -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
