-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move options that used tags to RequestOptions, replace tags with attr…
…ibutes (#2364)
- Loading branch information
Showing
13 changed files
with
158 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
package sttp.client4 | ||
|
||
import scala.concurrent.duration.Duration | ||
import sttp.model.HttpVersion | ||
import sttp.client4.logging.LoggingOptions | ||
|
||
/** Options for a [[Request]]. The defaults can be found on [[emptyRequest]]. */ | ||
case class RequestOptions( | ||
followRedirects: Boolean, | ||
readTimeout: Duration, // TODO: Use FiniteDuration while migrating to sttp-4 | ||
readTimeout: Duration, | ||
maxRedirects: Int, | ||
redirectToGet: Boolean | ||
redirectToGet: Boolean, | ||
disableAutoDecompression: Boolean, | ||
httpVersion: Option[HttpVersion], | ||
loggingOptions: LoggingOptions | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
package sttp | ||
|
||
package object client4 extends SttpApi { | ||
|
||
/** Provide an implicit value of this type to serialize arbitrary classes into a request body. Backends might also | ||
* provide special logic for serializer instances which they define (e.g. to handle streaming). | ||
*/ | ||
type BodySerializer[B] = B => BasicBodyPart | ||
|
||
type RetryWhen = (GenericRequest[_, _], Either[Throwable, Response[_]]) => Boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.