It enables using Backlog4J with Java11 or later by providing an implementation of com.nulabinc.backlog4j.http.BacklogHttpClient
using java.net.http.HttpClient
.
(The HTTP PATCH method is not available in Java 9 or later for Backlog4J)
Java11 or later
- Add a dependency to Backlog4J 2.5.1 or later to your project.
- Create a instance of
com.nulabinc.backlog4j.BacklogClient
usingjava.net.http.HttpClient
andcom.nulabinc.backlog4j.http.httpclient.HttpClientBacklogHttpClient
like below.
// Congigure
BacklogConfigure configure = ...;
// Create a builder instance to create the instance of HttpClient.
HttpClient.Builder httpClientBuilder = HttpClient.newBuilder();
// Use HttpClientBacklogHttpClient as an implementation of BacklogHttpClient.
BacklogHttpClient backlogHttpClient = new HttpClientBacklogHttpClient(httpClientBuilder);
// Create an instance of BacklogClient using the factory.
BacklogClient backlogClient = new BacklogClientFactory(configure, backlogHttpClient).newClient();
- After that, you can access the Backlog4J API via the BacklogClient instance.