-
Notifications
You must be signed in to change notification settings - Fork 395
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
Create HttpClientModule to handle HTTP request from another web server #61
Comments
Can you add some more detail about what you want to do please. |
I need write HttpClient to talk a remote server from Ratpack. I think it is a decent way to have it in Ratpack core. Otherwise, I could make use of HttpComponents, http://hc.apache.org/httpcomponents-client-ga/ |
I'm not sure about having it in the core. Ratpack is never going to have every feature as it's intended to be light. It might happen one day, but it's pretty far down on the list of priorities so isn't likely to happen anytime soon. You might be better rolling your own. There's not that much Ratpack integration that you'll need. You'll really just want to pack it up in Guice module. Also, you may want to look at http://vertx.io as it provides this out of the box. |
Agree. However, after introducing Vert.x jar, my app goes fat. My code as below: def client = Vertx.newVertx().createHttpClient() FYI. It is a common case to have HTTP/Rest client for integration purpose because every RESTful app wants to stay cool and thin. Some of tools are below:
|
I originally meant that you could use Vertx instead of Ratpack entirely. Might be worth checking out: https://github.com/jwagenleitner/groovy-wslite I'm starting to think it might be worth looking into something in core at some point, so the event loop can be shared. This is only really a concern in very high scale apps though. |
I like chain of handlers in Ratpack and I may use Ratpack on the front end and has some request to redirect to backend applications, say Grails. So, I would see the possibility to have Ratpack as a client. |
Wouldn't it be a good idea for any outbound HTTP requests to be made with Netty? Is there a Netty lib that could be used for this? |
There aren't any practically usable http clients built on Netty. Netty is too low level to use as a general purpose API client. |
Superseded by #217. |
No description provided.
The text was updated successfully, but these errors were encountered: