Skip to content

Commit

Permalink
quickRequest now uses asStringOrFail
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Dec 11, 2024
1 parent e4d8d95 commit 29df363
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/src/main/scala/sttp/client4/SttpApi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ trait SttpApi extends SttpExtensions with UriInterpolator {
val basicRequest: PartialRequest[Either[String, String]] =
emptyRequest.acceptEncoding("gzip, deflate")

/** A starting request which always reads the response body as a string, regardless of the status code. */
val quickRequest: PartialRequest[String] = basicRequest.response(asStringAlways)
/** A starting request which always reads the response body as a string, if the response code is successfull (2xx),
* and fails (throws an exception, or returns a failed effect) otherwise.
*/
val quickRequest: PartialRequest[String] = basicRequest.response(asStringOrFail)

// response descriptions

Expand Down

0 comments on commit 29df363

Please sign in to comment.