Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
wsargent committed Feb 27, 2020
1 parent f4e245b commit a70466b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import play.shaded.ahc.io.netty.buffer.Unpooled
import play.shaded.ahc.io.netty.handler.codec.http.HttpHeaders
import play.shaded.ahc.org.asynchttpclient.Realm.AuthScheme
import play.shaded.ahc.org.asynchttpclient._
import play.shaded.ahc.org.asynchttpclient.proxy.{ProxyType, ProxyServer => AHCProxyServer}
import play.shaded.ahc.org.asynchttpclient.proxy.ProxyType
import play.shaded.ahc.org.asynchttpclient.proxy.{ ProxyServer => AHCProxyServer }
import play.shaded.ahc.org.asynchttpclient.util.HttpUtils

import scala.collection.JavaConverters._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import play.shaded.ahc.org.asynchttpclient.Realm.AuthScheme
import play.shaded.ahc.org.asynchttpclient.SignatureCalculator
import play.shaded.ahc.org.asynchttpclient.Param
import play.shaded.ahc.org.asynchttpclient.proxy.ProxyType
import play.shaded.ahc.org.asynchttpclient.{Request => AHCRequest}
import play.shaded.ahc.org.asynchttpclient.{ Request => AHCRequest }

class AhcWSRequestSpec
extends Specification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ class AhcWSRequestSpec extends Specification with Mockito with DefaultBodyReadab
"Use a proxy server" in {
val client = mock[StandaloneAhcWSClient]
val request = new StandaloneAhcWSRequest(client, "http://example.com", /*materializer*/ null)
val proxyServer = DefaultWSProxyServer.builder()
val proxyServer = DefaultWSProxyServer
.builder()
.withHost("localhost")
.withPort(8080)
.withPrincipal("principal")
Expand All @@ -168,7 +169,8 @@ class AhcWSRequestSpec extends Specification with Mockito with DefaultBodyReadab
.withNonProxyHosts(java.util.Arrays.asList("derp"))
.build()

val req = request.setProxyServer(proxyServer)
val req = request
.setProxyServer(proxyServer)
.asInstanceOf[StandaloneAhcWSRequest]
.buildRequest()
val actual = req.getProxyServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ case class DefaultWSCookie(
* A WS proxy.
*/
trait WSProxyServer {

/** The hostname of the proxy server. */
def host: String

Expand Down

0 comments on commit a70466b

Please sign in to comment.