package com.twitter.finatra.httpclient

import com.twitter.finagle.http.{Request, Response}
import com.twitter.finagle.{Http, Service}

object RichHttpClient {

  /* Public */

  def newClientService(dest: String): Service[Request, Response] = {
    Http.client.newService(dest)
  }

  def newSslClientService(sslHostname: String, dest: String): Service[Request, Response] = {
    Http.client.withTls(sslHostname).newService(dest)
  }
}

package com.twitter.finatra.httpclient

import com.twitter.finagle.http.{Request, Response}
import com.twitter.finagle.{Http, Service}

object RichHttpClient {

  /* Public */

  def newClientService(dest: String): Service[Request, Response] = {
    Http.newClient(dest).toService
  }

  def newSslClientService(sslHostname: String, dest: String): Service[Request, Response] = {
    Http.client.withTls(sslHostname).newService(dest)
  }
}

--- 
+++ 
@@ -8,7 +8,7 @@
   /* Public */
 
   def newClientService(dest: String): Service[Request, Response] = {
-    Http.newClient(dest).toService
+    Http.client.newService(dest)
   }
 
   def newSslClientService(sslHostname: String, dest: String): Service[Request, Response] = {
finatra-httpclient: Change http client create method to Http.client.newService

Problem/Solution

Recent changes require a switch to the Http stack client to
mitigate connection issues with the underlying Fingle client.

Signed-off-by: Christopher Coco <ccoco@twitter.com>

RB_ID=911679
