konrad-kaminski / spring-kotlin-coroutine

Kotlin coroutine support for Spring.
448 stars 69 forks source link

DefaultCoroutineWebClient seems not supporting baseUrl #7

Closed sdeleuze closed 6 years ago

sdeleuze commented 6 years ago

DefaultCoroutineWebClient seems not supporting baseUrl definition at WebClient level. For example, see https://github.com/sdeleuze/spring-kotlin-deepdive/blob/step3-coroutine/src/test/kotlin/io/spring/deepdive/HtmlTests.kt which fails if you define DefaultCoroutineWebClient(WebClient.create("http://localhost:$port")) and just use relative url like client.get().uri("/api/user/").

konrad-kaminski commented 6 years ago

Fixed in 0.3.1.

Use CoroutineWebClient.create("http://localhost:$port").get().uri("/api/user/").