diff options
author | adamw <adam@warski.org> | 2017-08-02 12:08:32 +0200 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-08-02 12:08:32 +0200 |
commit | 02be9a13bf6e4a6da8a5ced85ae6b716a64c919a (patch) | |
tree | 70fe587146ab77214c47444809af9cf4564728b6 /core/src/main/scala | |
parent | 284860a8506589b19ca1afd2a33cecb45747f340 (diff) | |
download | sttp-02be9a13bf6e4a6da8a5ced85ae6b716a64c919a.tar.gz sttp-02be9a13bf6e4a6da8a5ced85ae6b716a64c919a.tar.bz2 sttp-02be9a13bf6e4a6da8a5ced85ae6b716a64c919a.zip |
OkHttp docs
Diffstat (limited to 'core/src/main/scala')
-rw-r--r-- | core/src/main/scala/com/softwaremill/sttp/UriInterpolator.scala | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/core/src/main/scala/com/softwaremill/sttp/UriInterpolator.scala b/core/src/main/scala/com/softwaremill/sttp/UriInterpolator.scala index 0472828..a99bab8 100644 --- a/core/src/main/scala/com/softwaremill/sttp/UriInterpolator.scala +++ b/core/src/main/scala/com/softwaremill/sttp/UriInterpolator.scala @@ -49,9 +49,11 @@ object UriInterpolator { // way it's possible to extend existing URIs. Without special-casing // the embedded URI would be escaped and become part of the host // as a whole. - if (tokens == Vector(StringToken("")) && nextExpression.toString.contains("://")) { + if (tokens == Vector(StringToken("")) && nextExpression.toString.contains( + "://")) { def tokenizeExpressionAsString(): Unit = { - val (nextTokenizer, nextTokens) = tokenizer.tokenize(nextExpression.toString) + val (nextTokenizer, nextTokens) = + tokenizer.tokenize(nextExpression.toString) tokenizer = nextTokenizer tokens = tokens ++ nextTokens } @@ -336,7 +338,11 @@ object UriInterpolator { import com.softwaremill.sttp.Uri.{QueryFragment => QF} override def fromTokens(u: Uri, t: Vector[Token]): (Uri, Vector[Token]) = - fromStartingToken(u, t, QueryStart, Set[Token](FragmentStart), queryFromTokens) + fromStartingToken(u, + t, + QueryStart, + Set[Token](FragmentStart), + queryFromTokens) private def queryFromTokens(u: Uri, tokens: Vector[Token]): Uri = { val qfs = @@ -398,12 +404,12 @@ object UriInterpolator { * The component is terminated by any of `nextComponentTokens`. */ private def fromStartingToken( - u: Uri, - t: Vector[Token], - startingToken: Token, - nextComponentTokens: Set[Token], - componentFromTokens: (Uri, Vector[Token]) => Uri) - : (Uri, Vector[Token]) = { + u: Uri, + t: Vector[Token], + startingToken: Token, + nextComponentTokens: Set[Token], + componentFromTokens: (Uri, Vector[Token]) => Uri) + : (Uri, Vector[Token]) = { t match { case `startingToken` +: tt => |