Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f5d3468

Browse files
author
Rajeev Kumar Singh
committed
Readme and Cleaning
1 parent 901d7cd commit f5d3468

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Consume and Test REST APIs using Spring 5's Reactive WebClient and WebTestClient.
22

3+
Read the tutorial - https://www.callicoder.com/spring-5-reactive-webclient-webtestclient-examples/
4+
35
## Steps to Setup
46

57
1. Create a personal access token on Github - https://github.com/settings/tokens

‎src/main/java/com/example/webclientdemo/GithubClient.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public Flux<GithubRepo> listGithubRepositories() {
5050
.flatMapMany(clientResponse -> clientResponse.bodyToFlux(GithubRepo.class));
5151
}
5252

53-
public Mono<GithubRepo> createGithubRepository(RepoRequest repoRequest) {
53+
public Mono<GithubRepo> createGithubRepository(RepoRequest createRepoRequest) {
5454
return webClient.post()
5555
.uri("/user/repos")
56-
.body(Mono.just(repoRequest), RepoRequest.class)
56+
.body(Mono.just(createRepoRequest), RepoRequest.class)
5757
.retrieve()
5858
.bodyToMono(GithubRepo.class);
5959
}
@@ -65,10 +65,10 @@ public Mono<GithubRepo> getGithubRepository(String owner, String repo) {
6565
.bodyToMono(GithubRepo.class);
6666
}
6767

68-
public Mono<GithubRepo> editGithubRepository(String owner, String repo, RepoRequest repoRequest) {
68+
public Mono<GithubRepo> editGithubRepository(String owner, String repo, RepoRequest editRepoRequest) {
6969
return webClient.patch()
7070
.uri("/repos/{owner}/{repo}", owner, repo)
71-
.body(BodyInserters.fromObject(repoRequest))
71+
.body(BodyInserters.fromObject(editRepoRequest))
7272
.retrieve()
7373
.bodyToMono(GithubRepo.class);
7474
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /