You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: common/kobwebx-serialization-kotlinx/src/jsMain/kotlin/com/varabyte/kobweb/browser/ApiFetcherExtensions.kt
Copy file name to clipboardExpand all lines: common/kobwebx-serialization-kotlinx/src/jsMain/kotlin/com/varabyte/kobweb/browser/http/HttpFetcherExtensions.kt
* Like [post] but returns null instead of throwing if the request fails.
213
211
*
214
-
* Additionally, if [logOnError] is set to true, any failure will be logged to the console. By default, this will
215
-
* be true for debug builds and false for release builds.
212
+
* Additionally, if [HttpFetcher.logOnError] is set to true, any failure will be logged to the console. By default, this
213
+
* will be true for debug builds and false for release builds.
216
214
*
217
215
* If you plan to do additional operations on the response and would also like to have logging / exception
218
216
* protection for them, consider using the other [tryPost] call which lets you pass in a `transform` callback.
@@ -252,8 +250,8 @@ suspend inline fun <reified B> HttpFetcher.tryPostBytes(
252
250
/**
253
251
* Like [post], but returns null if the request fails or the response can't be deserialized.
254
252
*
255
-
* Additionally, if [HttpFetcher.logOnError] is set to true, any failure will be logged to the console. By default, this will
256
-
* be true for debug builds and false for release builds.
253
+
* Additionally, if [HttpFetcher.logOnError] is set to true, any failure will be logged to the console. By default, this
254
+
* will be true for debug builds and false for release builds.
257
255
*/
258
256
@Deprecated("With these serialization-aware network methods, we are moving response deserialization handling to a separate `bodyAs` call. This lets us accomplish the same amount of functionality with fewer methods.",
259
257
ReplaceWith(
@@ -411,8 +409,8 @@ suspend inline fun <reified R> HttpFetcher.put(
411
409
* You are generally encouraged to call `tryPut(...) { convert() }` over `tryPut(...)?.convert()` as the former will
412
410
* ensure that exception handling is covered in that case.
413
411
*
414
-
* Additionally, if [logOnError] is set to true, any failure will be logged to the console (including the logic in
415
-
* the [transform] block).
412
+
* Additionally, if [HttpFetcher.logOnError] is set to true, any failure will be logged to the console (including the
413
+
* logic in the [transform] block).
416
414
*
417
415
* If you do not care about converting the result to some arbitrary type, use the [tryPut] version that returns
418
416
* [Response?][Response] instead. For serialization-aware methods, it is expected that users will rarely, if ever, need
* Like [put] but returns null instead of throwing if the request fails.
433
431
*
434
-
* Additionally, if [logOnError] is set to true, any failure will be logged to the console. By default, this will
435
-
* be true for debug builds and false for release builds.
432
+
* Additionally, if [HttpFetcher.logOnError] is set to true, any failure will be logged to the console. By default, this
433
+
* will be true for debug builds and false for release builds.
436
434
*
437
435
* If you plan to do additional operations on the response and would also like to have logging / exception
438
436
* protection for them, consider using the other [tryPut] call which lets you pass in a `transform` callback.
@@ -474,8 +472,8 @@ suspend inline fun <reified B> HttpFetcher.tryPutBytes(
474
472
/**
475
473
* Like [put], but returns null if the request fails or the response can't be deserialized.
476
474
*
477
-
* Additionally, if [HttpFetcher.logOnError] is set to true, any failure will be logged to the console. By default, this will
478
-
* be true for debug builds and false for release builds.
475
+
* Additionally, if [HttpFetcher.logOnError] is set to true, any failure will be logged to the console. By default, this
476
+
* will be true for debug builds and false for release builds.
479
477
*/
480
478
@Deprecated("With these serialization-aware network methods, we are moving response deserialization handling to a separate `bodyAs` call. This lets us accomplish the same amount of functionality with fewer methods.",
481
479
ReplaceWith(
@@ -633,8 +631,8 @@ suspend inline fun <reified R> HttpFetcher.patch(
633
631
* You are generally encouraged to call `tryPatch(...) { convert() }` over `tryPatch(...)?.convert()` as the former will
634
632
* ensure that exception handling is covered in that case.
635
633
*
636
-
* Additionally, if [logOnError] is set to true, any failure will be logged to the console (including the logic in
637
-
* the [transform] block).
634
+
* Additionally, if [HttpFetcher.logOnError] is set to true, any failure will be logged to the console (including the
635
+
* logic in the [transform] block).
638
636
*
639
637
* If you do not care about converting the result to some arbitrary type, use the [tryPatch] version that returns
640
638
* [Response?][Response] instead. For serialization-aware methods, it is expected that users will rarely, if ever, need
* Like [patch] but returns null instead of throwing if the request fails.
655
653
*
656
-
* Additionally, if [logOnError] is set to true, any failure will be logged to the console. By default, this will
657
-
* be true for debug builds and false for release builds.
654
+
* Additionally, if [HttpFetcher.logOnError] is set to true, any failure will be logged to the console. By default, this
655
+
* will be true for debug builds and false for release builds.
658
656
*
659
657
* If you plan to do additional operations on the response and would also like to have logging / exception
660
658
* protection for them, consider using the other [tryPatch] call which lets you pass in a `transform` callback.
@@ -695,8 +693,8 @@ suspend inline fun <reified B> HttpFetcher.tryPatchBytes(
695
693
/**
696
694
* Like [patch], but returns null if the request fails or the response can't be deserialized.
697
695
*
698
-
* Additionally, if [HttpFetcher.logOnError] is set to true, any failure will be logged to the console. By default, this will
699
-
* be true for debug builds and false for release builds.
696
+
* Additionally, if [HttpFetcher.logOnError] is set to true, any failure will be logged to the console. By default, this
697
+
* will be true for debug builds and false for release builds.
700
698
*/
701
699
@Deprecated("With these serialization-aware network methods, we are moving response deserialization handling to a separate `bodyAs` call. This lets us accomplish the same amount of functionality with fewer methods.",
0 commit comments