@@ -57,7 +57,7 @@ sealed class SDKResponse {
5757 /* * A successful SDK call. */
5858 data class SDKSuccessResponse <T >(
5959 /* * The object returned by the SDK call. */
60- val value : T
60+ val value : T ,
6161 ) : SDKResponse() {
6262 /* * Whether the SDK call was successful. */
6363 val ok: Boolean = true
@@ -66,7 +66,7 @@ sealed class SDKResponse {
6666 /* * An erroring SDK call. */
6767 data class SDKErrorResponse <T >(
6868 /* * The error object returned by the SDK call. */
69- val value : T
69+ val value : T ,
7070 ) : SDKResponse() {
7171 /* * Whether the SDK call was successful. */
7272 val ok: Boolean = false
@@ -96,14 +96,14 @@ enum class HttpMethod(val value: io.ktor.http.HttpMethod) {
9696 PUT (io.ktor.http.HttpMethod .Put ),
9797 DELETE (io.ktor.http.HttpMethod .Delete ),
9898 PATCH (io.ktor.http.HttpMethod .Patch ),
99- HEAD (io.ktor.http.HttpMethod .Head )
99+ HEAD (io.ktor.http.HttpMethod .Head ),
100100 // TODO: Using the ktor-client-apache may support TRACE?
101101}
102102
103103data class RequestSettings (
104104 val method : HttpMethod ,
105105 val url : String ,
106- val headers : Map <String , String > = emptyMap()
106+ val headers : Map <String , String > = emptyMap(),
107107)
108108
109109typealias Authenticator = (init : RequestSettings ) -> RequestSettings
@@ -209,14 +209,14 @@ fun customClient(options: TransportOptions): HttpClient {
209209 @Throws(CertificateException ::class )
210210 override fun checkClientTrusted (
211211 certs : Array <X509Certificate ?>? ,
212- authType : String?
212+ authType : String? ,
213213 ) {
214214 }
215215
216216 @Throws(CertificateException ::class )
217217 override fun checkServerTrusted (
218218 certs : Array <X509Certificate ?>? ,
219- authType : String?
219+ authType : String? ,
220220 ) {
221221 }
222222 }
@@ -225,7 +225,8 @@ fun customClient(options: TransportOptions): HttpClient {
225225 sslContext.init (null , trustAllCerts, SecureRandom ())
226226 val sslSocketFactory: SSLSocketFactory = sslContext.socketFactory
227227 sslSocketFactory(
228- sslSocketFactory, tm
228+ sslSocketFactory,
229+ tm,
229230 )
230231
231232 val hostnameVerifier = HostnameVerifier { _, _ ->
@@ -252,7 +253,7 @@ class Transport(val options: TransportOptions) {
252253 fun makeUrl (
253254 path : String ,
254255 queryParams : Values = emptyMap(),
255- authenticator : Authenticator ? = null // TODO figure out why ::defaultAuthenticator is matching when it shouldn't
256+ authenticator : Authenticator ? = null, // TODO figure out why ::defaultAuthenticator is matching when it shouldn't
256257 ): String {
257258 return if (path.startsWith(" http://" , true ) ||
258259 path.startsWith(" https://" , true )
@@ -272,7 +273,7 @@ class Transport(val options: TransportOptions) {
272273 path : String ,
273274 queryParams : Values = emptyMap(),
274275 body : Any? = null,
275- noinline authenticator : Authenticator ? = null
276+ noinline authenticator : Authenticator ? = null,
276277 ): SDKResponse {
277278 // TODO get overrides parameter to work without causing compilation errors in UserSession
278279// overrides: TransportOptions? = null): SDKResponse {
@@ -293,7 +294,7 @@ class Transport(val options: TransportOptions) {
293294 SDKResponse .SDKSuccessResponse (
294295 client.request<HttpStatement >(builder).execute { response: HttpResponse ->
295296 response.receive<T >()
296- }
297+ },
297298 )
298299 }
299300 } catch (e: Exception ) {
@@ -310,7 +311,7 @@ class Transport(val options: TransportOptions) {
310311 path : String ,
311312 queryParams : Values ,
312313 authenticator : Authenticator ? ,
313- body : Any?
314+ body : Any? ,
314315 ): HttpRequestBuilder {
315316 val builder = HttpRequestBuilder ()
316317 // Set the request method
@@ -323,7 +324,8 @@ class Transport(val options: TransportOptions) {
323324
324325 var auth = authenticator ? : ::defaultAuthenticator
325326 if (path.startsWith(" http://" , true ) ||
326- path.startsWith(" https://" , true )) {
327+ path.startsWith(" https://" , true )
328+ ) {
327329 // if a full path is passed in, this is a straight fetch, not an API call
328330 // so don't authenticate
329331 auth = ::defaultAuthenticator
0 commit comments