Spring WebClient for Easy Access to OAuth 2.0 Protected Resources
This tutorial shows how to integrate third-party secure resources with Spring WebClient.
Spring WebClient for Easy Access to OAuth 2.0 Protected Resources
This tutorial shows how to integrate third-party secure resources with Spring WebClient.
Thank you for the great article! Everything was very well-explained and introduced.
I found a bug in the test - it’s not actually testing that the json is correct (I noticed because there are two typos in the code:
mockWebServer.enqueue(new MockResponse()
.addHeader("Content-Type", "application/json; charset=utf-8")
.setBody("{ \"totalCount\": 9}"));
.expectBody().jsonPath("$.tocalCount", 9);
To make it work, two things need to be updated:
mockWebServer.enqueue(new MockResponse()
.addHeader("Content-Type", "application/json; charset=utf-8")
.setBody("{ \"total_count\": 9}"));
and
.expectBody().jsonPath("$.total_count").isEqualTo(9);
Hopefully this will help others!
Best,
Jessica