Skip to content

Commit

Permalink
fix: run .toBodilessEntity() on retrieveNone() so that onStatus h…
Browse files Browse the repository at this point in the history
…andlers are ran
  • Loading branch information
testersen committed May 27, 2024
1 parent 261f7ed commit 112ed66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/no/telenor/kt/restclient/util/util.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ inline fun <reified T : Any> RequestHeadersSpec<*>.retrieveJsonOrNull(): T? = th
inline fun <reified T : Any> RequestHeadersSpec<*>.retrieveJson(): T = retrieveJsonOrNull()!!

fun RequestHeadersSpec<*>.retrieveNone() {
this.retrieve()
this.retrieve().toBodilessEntity()
}

inline fun <reified ResponseType : Any> RequestHeadersSpec<*>.retrieveEntity(): ResponseEntity<ResponseType> =
Expand Down

0 comments on commit 112ed66

Please sign in to comment.