diff --git a/README.md b/README.md index b34d0f00..770a4718 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ httpClient.POST[ResponseType](url, payload, headers) becomes ```scala -httpClientV2.post(url"$url").withBody(Json.toJson(payload)).addHeaders(headers).execute[ResponseType] +httpClientV2.post(url"$url").withBody(Json.toJson(payload)).setHeader(headers).execute[ResponseType] ``` If you were previously creating multiple HttpClients to configure proxies or change the user-agent, this will no-longer be necessary since these can all be controlled with the HttpClientV2 API per call. diff --git a/http-verbs-play-30/src/test/scala/uk/gov/hmrc/http/client/HttpClientV2Spec.scala b/http-verbs-play-30/src/test/scala/uk/gov/hmrc/http/client/HttpClientV2Spec.scala index 03bd34a9..74bd56ac 100644 --- a/http-verbs-play-30/src/test/scala/uk/gov/hmrc/http/client/HttpClientV2Spec.scala +++ b/http-verbs-play-30/src/test/scala/uk/gov/hmrc/http/client/HttpClientV2Spec.scala @@ -25,7 +25,7 @@ import org.mockito.Mockito.verify import org.scalatest.BeforeAndAfter import org.scalatest.concurrent.{IntegrationPatience, ScalaFutures} import org.scalatest.matchers.should.Matchers -import org.scalatest.wordspec.AnyWordSpecLike +import org.scalatest.wordspec.AnyWordSpec import org.scalatestplus.mockito.MockitoSugar import play.api.Configuration import play.api.libs.json.{Json, Reads, Writes} @@ -46,7 +46,7 @@ import scala.concurrent.ExecutionContext.Implicits.global import scala.util.Random class HttpClientV2Spec - extends AnyWordSpecLike + extends AnyWordSpec with Matchers with WireMockSupport with ScalaFutures diff --git a/project/LibDependencies.scala b/project/LibDependencies.scala index 3577b96d..97919589 100644 --- a/project/LibDependencies.scala +++ b/project/LibDependencies.scala @@ -2,14 +2,14 @@ import sbt._ object LibDependencies { - val play28Version = "2.8.21" - val play29Version = "2.9.2" - val play30Version = "3.0.2" + val play28Version = "2.8.22" + val play29Version = "2.9.4" + val play30Version = "3.0.4" // Dependencies for http-verbs-common and http-verbs-play-xxx modules def coreCompileCommon(scalaVersion: String) = Seq( "com.typesafe" % "config" % "1.4.3", - "com.softwaremill.sttp.model" %% "core" % "1.7.2", + "com.softwaremill.sttp.model" %% "core" % "1.7.10", "dev.zio" %% "izumi-reflect" % "2.3.8" ) ++ (CrossVersion.partialVersion(scalaVersion) match { @@ -26,25 +26,22 @@ object LibDependencies { ) val coreCompilePlay29 = Seq( - "com.typesafe.play" %% "play-json" % "2.10.4", // version provided by play29Version + "com.typesafe.play" %% "play-json" % "2.10.6", // version provided by play29Version "org.slf4j" % "slf4j-api" % "2.0.9", "com.typesafe.play" %% "play-ahc-ws" % play29Version ) val coreCompilePlay30 = Seq( - "org.playframework" %% "play-json" % "3.0.2", // version provided by play30Version + "org.playframework" %% "play-json" % "3.0.4", // version provided by play30Version "org.slf4j" % "slf4j-api" % "2.0.9", "org.playframework" %% "play-ahc-ws" % play30Version ) def coreTestCommon = Seq( - "org.scalatest" %% "scalatest" % "3.2.17" % Test, - "org.scalatestplus" %% "scalacheck-1-17" % "3.2.17.0" % Test, - "com.vladsch.flexmark" % "flexmark-all" % "0.64.8" % Test, - // mockito-scala is not available for Scala 3 https://github.com/mockito/mockito-scala/issues/364 - // use java build + scalatestplus:mockito - "org.scalatestplus" %% "mockito-3-4" % "3.2.10.0" % Test // recommended by play docs https://www.playframework.com/documentation/3.0.x/ScalaTestingWithScalaTest - // or https://mvnrepository.com/artifact/eu.monniot/scala3mock + "org.scalatest" %% "scalatest" % "3.2.17" % Test, + "org.scalatestplus" %% "scalacheck-1-17" % "3.2.17.0" % Test, + "com.vladsch.flexmark" % "flexmark-all" % "0.64.8" % Test, + "org.scalatestplus" %% "mockito-4-11" % "3.2.17.0" % Test ) val coreTestPlay28 = Seq( diff --git a/project/build.properties b/project/build.properties index 880e8fbf..daaabb75 100644 --- a/project/build.properties +++ b/project/build.properties @@ -14,4 +14,4 @@ # limitations under the License. # -sbt.version=1.9.7 +sbt.version=1.9.9 diff --git a/project/plugins.sbt b/project/plugins.sbt index e8fc6695..804d6243 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ resolvers += MavenRepository("HMRC-open-artefacts-maven2", "https://open.artefacts.tax.service.gov.uk/maven2") resolvers += Resolver.url("HMRC-open-artefacts-ivy2", url("https://open.artefacts.tax.service.gov.uk/ivy2"))(Resolver.ivyStylePatterns) -addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.21.0") +addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.22.0")