playframework/playframework — pull request #3478 by gmethvin (2014-10-28 23:18:22+00:00)
Title: Construction of WSClient could be improved

Right now, in order to construct a NingWSClient entirely programmatically, you have to do something like

```
import play.api.libs.ws.ning.NingAsyncHttpClientConfigBuilder
import play.api.libs.ws.ning.NingWSClient
import com.ning.http.client.AsyncHttpClientConfig

val clientConfig = new DefaultWSClientConfig()
val secureDefaults: AsyncHttpClientConfig = new NingAsyncHttpClientConfigBuilder(clientConfig).build()
// You can directly use the builder for specific options once you have secure TLS defaults...
val builder = new AsyncHttpClientConfig.Builder(secureDefaults)
builder.setCompressionEnabled(true)
val secureDefaultsWithSpecificOptions: AsyncHttpClientConfig = builder.build()
val wsClient:WSClient = new NingWSClient(secureDefaultsWithSpecificOptions)
```

This could be much cleaner.