securitySource() {
public int serverIdx = 0;
public String language = "java";
public String openapiDocVersion = "v1";
- public String sdkVersion = "0.0.7";
- public String genVersion = "2.342.6";
- public String userAgent = "speakeasy-sdk/java 0.0.7 2.342.6 v1 com.clerk.backend_api";
+ public String sdkVersion = "0.1.0";
+ public String genVersion = "2.352.0";
+ public String userAgent = "speakeasy-sdk/java 0.1.0 2.352.0 v1 com.clerk.backend_api";
private com.clerk.backend_api.utils.Hooks _hooks = createHooks();
diff --git a/src/main/java/com/clerk/backend_api/utils/HTTPClient.java b/src/main/java/com/clerk/backend_api/utils/HTTPClient.java
index 6fe4f23..cd514c0 100644
--- a/src/main/java/com/clerk/backend_api/utils/HTTPClient.java
+++ b/src/main/java/com/clerk/backend_api/utils/HTTPClient.java
@@ -11,6 +11,22 @@
import java.net.http.HttpRequest;
public interface HTTPClient {
+
+ /**
+ * Sends an HTTP request and returns the response.
+ *
+ * Note that {@link HttpRequest} is immutable. To modify the request you can use
+ * {@link HttpRequest#newBuilder(HttpRequest, BiPredicate)} with
+ * JDK 16 and later (which will copy the request for modification in a builder).
+ * If that method is not available then use {@link Helpers#copy} (which also returns
+ * a builder).
+ *
+ * @param request HTTP request
+ * @return HTTP response
+ * @throws IOException
+ * @throws InterruptedException
+ * @throws URISyntaxException
+ */
HttpResponse send(HttpRequest request)
throws IOException, InterruptedException, URISyntaxException;
}
diff --git a/src/main/java/com/clerk/backend_api/utils/Hook.java b/src/main/java/com/clerk/backend_api/utils/Hook.java
index 17d5ffd..b434b70 100644
--- a/src/main/java/com/clerk/backend_api/utils/Hook.java
+++ b/src/main/java/com/clerk/backend_api/utils/Hook.java
@@ -144,6 +144,12 @@ public interface BeforeRequest {
/**
* Transforms the given {@link HttpRequest} before sending.
*
+ * Note that {@link HttpRequest} is immutable. To modify the request you can use
+ * {@link HttpRequest#newBuilder(HttpRequest, BiPredicate)} with
+ * JDK 16 and later (which will copy the request for modification in a builder).
+ * If that method is not available then use {@link Helpers#copy} (which also returns
+ * a builder).
+ *
* @param context context for the hook call
* @param request request to be transformed
* @return transformed request
diff --git a/src/main/java/com/clerk/backend_api/utils/Hooks.java b/src/main/java/com/clerk/backend_api/utils/Hooks.java
index 73f41f5..3908ffc 100644
--- a/src/main/java/com/clerk/backend_api/utils/Hooks.java
+++ b/src/main/java/com/clerk/backend_api/utils/Hooks.java
@@ -99,7 +99,7 @@ public Hooks registerAfterError(AfterError afterError) {
}
/**
- * Registers a {@SdkInit} hook to be applied in order of registration
+ * Registers a {@link SdkInit} hook to be applied in order of registration
* (multiple can be registered).
*
* @param SdkInit hook to be registered