playframework / playframework/play-ws

Feature request: with custom DNS/name resolver

Open
#407 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
224
Forks
92
Avg merge
1d 19h
Merged PRs (30d)
28

Description

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)
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shaded AHC org.asynchttpclient.RequestBuilderBase and its DEFAULT_NAME_RESOLVER, then trace how Play WS constructs requests. Define the supported custom-resolver configuration and document its usage, including whether the existing monkey-patching example remains necessary.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, scala
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.