Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Allow passing an AsyncHttpClient to the Reporter/Builder #11

Closed
sclasen opened this issue Oct 3, 2012 · 3 comments
Closed

Allow passing an AsyncHttpClient to the Reporter/Builder #11

sclasen opened this issue Oct 3, 2012 · 3 comments

Comments

@sclasen
Copy link

sclasen commented Oct 3, 2012

instead of private client.

You could then from play 2, pass in the play.api.libs.ws.WS.client instance

@mihasya
Copy link
Contributor

mihasya commented Oct 4, 2012

Err not sure I understand.. Could you elaborate the exact use case please? Is this still something you would like, #10 having been resolved?

@sclasen
Copy link
Author

sclasen commented Oct 9, 2012

Actually a probably better ask is some interface that provides the minimum extraction of functionality from asynchttpclient so that its straightforward to substitute other http clients. Would be kinda of a drag if I had to deal with version conflicts or pulling in AHC+Netty at all in a metrics library, if I had chosen to use a (possibly incomaptible) version of netty, or not to use Netty at all and instead to use something like spray-can

We did something similar to this in our heroku api java client and its worked out well

https://github.com/heroku/heroku.jar/tree/master/heroku-api/src/main/java/com/heroku/api/connection

There are impls for apache, ahc, finagle, playframework WS, and jersey that allow you to use your existing http stack in your app, rather than pull in yet another http client.

@collinvandyck
Copy link
Contributor

This has been addressed in e6548a9. You should be able to pass in your own implementation of HttpPoster (the default is still the Ning async client).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants