mtpettyp
mtpettyp

Reputation: 5569

Play Framework WS async call is repeated after an HTTP 401

If an external web service returns an HTTP 401 to a Play Framework async WS call the same request appears to be performed automatically again.

WS.url(url)
  .get()
  .map (...)
}

Upvotes: 1

Views: 200

Answers (1)

mtpettyp
mtpettyp

Reputation: 5569

This turns out to be an issue with the Async Http Client, a dependency of the Play Framework.

It's fixed in com.ning:async-http-client:1.7.12 - https://github.com/AsyncHttpClient/async-http-client/issues/213

To update the dependency modify your project/Build.scala as follows:

...
val appDependencies = Seq(
    ....
    "com.ning" % "async-http-client" % "1.7.17"
)

Upvotes: 2

Related Questions