play-ws icon indicating copy to clipboard operation
play-ws copied to clipboard

Feature request: with custom DNS/name resolver

Open PAStheLoD opened this issue 6 years ago • 0 comments

Play WS Version (2.5.x / etc)

N/A

API (Scala / Java / Neither / Both)

Scala (or Both)

Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)

N/A

JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)

N/A

Library Dependencies

AHC (and/or Akka HTTP, though that effort seems rather severely stalled)

Expected Behavior

Currently there's no way to sanely pass in a different name resolver, instead one has to change one field (the static DEFAULT_NAME_RESOLVER in RequestBuilderBase) in the shaded AHC package.

Also simply documenting it would probably help a bit, eg. something like:

def monkeyPatchPlayWsShadedAhcRequestBuilderBase(): Unit = {
    play.shaded.ahc.org.asynchttpclient.RequestBuilderBase.DEFAULT_NAME_RESOLVER =
      new YourSpecialResolver(ImmediateEventExecutor.INSTANCE)
}

PAStheLoD avatar Oct 14 '19 02:10 PAStheLoD