...
FeignBuilder
kan sedan användas för att skapa upp en faktisk klient:
Code Block | ||
---|---|---|
| ||
varGithubClient githubClientghClient = new FeignBuilder() .withBaseUrl("https://api.github.com/") [1] .withLogbook(...) [2] .withOAuth2Client(...) [3] .withBasicAuthentication(...) [4] .withConnectTimeout(...) [5] .withReadTimeout(...) [6] .withFollowRedirects(...) [7] .withClient(...) |8] .withContract(...) [9] .withEncoder(...) [10] .withDecoder(...) [11] .withRetryer(...) [12] .build(GithubClient.class); [13] ... varList<Repo> repos = githubClientghClient.getRepositories("Sundsvallskommun"); ... |
...