@@ -22,6 +22,7 @@ public class AuthsignalClient {
2222
2323 private static final String DEFAULT_API_URL = "https://api.authsignal.com/v1" ;
2424 private static final int DEFAULT_RETRIES = 2 ;
25+ private static final String VERSION = "2.3.0" ;
2526
2627 public Webhook webhook ;
2728
@@ -119,6 +120,7 @@ private CompletableFuture<HttpResponse<String>> getRequest(String path) {
119120 HttpRequest request = HttpRequest .newBuilder ()
120121 .uri (uri )
121122 .header ("Authorization" , getBasicAuthHeader ())
123+ .header ("X-Authsignal-Version" , VERSION )
122124 .GET ()
123125 .build ();
124126
@@ -137,6 +139,7 @@ private CompletableFuture<HttpResponse<String>> postRequest(String path, String
137139 .uri (uri )
138140 .header ("Authorization" , getBasicAuthHeader ())
139141 .header ("Content-Type" , "application/json" )
142+ .header ("X-Authsignal-Version" , VERSION )
140143 .POST (HttpRequest .BodyPublishers .ofString (body ))
141144 .build ();
142145
@@ -155,6 +158,7 @@ private CompletableFuture<HttpResponse<String>> patchRequest(String path, String
155158 .uri (uri )
156159 .header ("Authorization" , getBasicAuthHeader ())
157160 .header ("Content-Type" , "application/json" )
161+ .header ("X-Authsignal-Version" , VERSION )
158162 .method ("PATCH" , HttpRequest .BodyPublishers .ofString (body ))
159163 .build ();
160164
@@ -172,6 +176,7 @@ private CompletableFuture<HttpResponse<String>> deleteRequest(String path) {
172176 HttpRequest request = HttpRequest .newBuilder ()
173177 .uri (uri )
174178 .header ("Authorization" , getBasicAuthHeader ())
179+ .header ("X-Authsignal-Version" , VERSION )
175180 .DELETE ()
176181 .build ();
177182
0 commit comments