Skip to content
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

Utility methods in server project for accessing path variables #104

Closed
sachin-walia opened this issue Sep 24, 2017 · 8 comments
Closed

Utility methods in server project for accessing path variables #104

sachin-walia opened this issue Sep 24, 2017 · 8 comments
Labels
enhancement Issue: Enhancement

Comments

@sachin-walia
Copy link
Contributor

Although light-4j uses undertow internally but I believe it might be a good idea to add some utility methods to extract query params, path params etc. There is a project here on github where such kind of four utility classes exists that may hide little bit of boilerplate code.

https://github.com/StubbornJava/StubbornJava/tree/master/stubbornjava-undertow/src/main/java/com/stubbornjava/undertow/exchange

Not sure about the license though if MIT license is interoperable with ASL.

@stevehu
Copy link
Contributor

stevehu commented Sep 24, 2017

@sachinwalia2k8 Excellent findings. I was constantly asked to provide something like that as majority our developers have JAXRS background and not comfortable with exchange APIs. It is in MIT license and we can use it freely. I will take a look and migrate useful utilities. Thanks.

@sachin-walia
Copy link
Contributor Author

@stevehu please take a look at this class as well that provides the implementation of above interfaces:
https://github.com/StubbornJava/StubbornJava/blob/master/stubbornjava-common/src/main/java/com/stubbornjava/common/undertow/Exchange.java

@sachin-walia
Copy link
Contributor Author

I have ported some of the above mentioned methods to my codebase. However I think it would make sense for this to be part of light4j framework. Which project within light4j should logically house these classes? Also do I need to add any attribution to the original author when porting it to light4j?

@stevehu
Copy link
Contributor

stevehu commented Sep 28, 2017

Handler module is the best place as it has existing dependency on Undertow. If you port the code, please put the original author(s) and yourself as @author. This is the way to pay respect to the original authors and contributors. Thanks.

@stevehu
Copy link
Contributor

stevehu commented Sep 28, 2017

@sachinwalia2k8 Thanks for the pull request. I will change the package name a little so that it can blend into the existing code.

@stevehu stevehu added the enhancement Issue: Enhancement label Oct 11, 2017
@shahrk
Copy link

shahrk commented Jul 11, 2020

Can you refer me to any documentation for extracting path params & request body? @stevehu

@stevehu
Copy link
Contributor

stevehu commented Jul 11, 2020

@shahrk The information is scattered in several links and I will put them together for users to write business handlers. Should be done today or tomorrow. Thanks a lot for raising the question.

@stevehu
Copy link
Contributor

stevehu commented Jul 11, 2020

@shahrk Please take a look at this document and let me know if there is anything missing. Thanks.

https://doc.networknt.com/concern/business-handler/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue: Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants