Skip to content

Commit

Permalink
Add finagle httpx methods to HttpClientService
Browse files Browse the repository at this point in the history
Summary:
An initial step towards upgrading finagle.
httpx no longer exposes httpRequest and HttpResponse and has replaced
them with Request and Response. Add FSHttpXClient that uses these.

Reviewed By: tdyas

(sapling split of 332f05bd05941fc988c1286e4fd9a03d21819c2d)
  • Loading branch information
Tansy Arron authored and mateor committed Feb 16, 2017
1 parent 2e650d1 commit a92d603
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/jvm/io/fsq/fhttp/FHttpClient.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import com.twitter.util.Future
import org.jboss.netty.handler.codec.http._


class FHttpClient ( val name: String,
val hostPort: String, // host:port
builder: ClientBuilder[HttpRequest, HttpResponse, Nothing, Yes, Yes] =
ClientBuilder().codec(Http()).tcpConnectTimeout(1.second).hostConnectionLimit(1)) {
class FHttpClient (
val name: String,
val hostPort: String, // host:port
builder: ClientBuilder[HttpRequest, HttpResponse, Nothing, Yes, Yes] =
ClientBuilder().codec(Http()).tcpConnectTimeout(1.second).hostConnectionLimit(1)) {

object throwHttpErrorsFilter extends SimpleFilter[HttpRequest, HttpResponse] {
def apply(request: HttpRequest, service: Service[HttpRequest, HttpResponse]) = {
Expand Down

0 comments on commit a92d603

Please sign in to comment.