From 069c42045fabaeac1429743819833a5d808c7b65 Mon Sep 17 00:00:00 2001 From: AshCorr Date: Wed, 15 Jan 2025 16:30:28 +0000 Subject: [PATCH 1/2] Bump `async-http-client` to v3.0.1 --- core/build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/build.sbt b/core/build.sbt index 43d4a7e..c35e40c 100644 --- a/core/build.sbt +++ b/core/build.sbt @@ -4,7 +4,7 @@ description := "Core Dispatch module wrapping async-http-client" libraryDependencies += - "org.asynchttpclient" % "async-http-client" % "3.0.0" + "org.asynchttpclient" % "async-http-client" % "3.0.1" enablePlugins(BuildInfoPlugin) From f72ddec12283818eb67b955161e50f932b37fd14 Mon Sep 17 00:00:00 2001 From: Ashleigh Carr Date: Wed, 15 Jan 2025 16:57:49 +0000 Subject: [PATCH 2/2] Add wrapper for new `addCookieIfUnset` function --- core/src/main/scala/requests.scala | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/main/scala/requests.scala b/core/src/main/scala/requests.scala index 58a86c6..ed9a261 100644 --- a/core/src/main/scala/requests.scala +++ b/core/src/main/scala/requests.scala @@ -484,6 +484,14 @@ trait RequestBuilderVerbs extends RequestVerbs { subject.underlying(_.addOrReplaceCookie(cookie)) } + /** + * Add a cookie based on its name, if it does not exist yet. Cookies that + * are already set will be ignored. + */ + def addCookieIfUnset(cookie: Cookie) = { + subject.underlying(_.addCookieIfUnset(cookie)) + } + /** * Set auth realm */