Add cookie support to RestClient

See gh-33697
This commit is contained in:
Nicklas Wiegandt
2024-10-13 19:07:00 +02:00
committed by rstoyanchev
parent d8c153a9d1
commit a0af708c03
6 changed files with 339 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ RestClient customClient = RestClient.builder()
.baseUrl("https://example.com")
.defaultUriVariables(Map.of("variable", "foo"))
.defaultHeader("My-Header", "Foo")
.defaultCookie("My-Cookie", "Bar")
.requestInterceptor(myCustomInterceptor)
.requestInitializer(myCustomInitializer)
.build();
@@ -55,6 +56,7 @@ val customClient = RestClient.builder()
.baseUrl("https://example.com")
.defaultUriVariables(mapOf("variable" to "foo"))
.defaultHeader("My-Header", "Foo")
.defaultCookie("My-Cookie", "Bar")
.requestInterceptor(myCustomInterceptor)
.requestInitializer(myCustomInitializer)
.build()