diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/com/softwaremill/sttp/UriInterpolator.scala | 4 | ||||
-rw-r--r-- | core/src/test/scala/com/softwaremill/sttp/UriInterpolatorTests.scala | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/core/src/main/scala/com/softwaremill/sttp/UriInterpolator.scala b/core/src/main/scala/com/softwaremill/sttp/UriInterpolator.scala index f77951c..8d0024a 100644 --- a/core/src/main/scala/com/softwaremill/sttp/UriInterpolator.scala +++ b/core/src/main/scala/com/softwaremill/sttp/UriInterpolator.scala @@ -501,7 +501,9 @@ object UriInterpolator { valueTs match { case Vector() => acc // tailTs must be empty then as well - case Vector(ExpressionToken(s: Seq[_])) => + case Vector(ExpressionToken(s: Iterable[_])) => + doToSeq(tailTs, acc ++ s.flatMap(anyToStringOpt).toVector) + case Vector(ExpressionToken(s: Array[_])) => doToSeq(tailTs, acc ++ s.flatMap(anyToStringOpt).toVector) case _ => val values = valueTs diff --git a/core/src/test/scala/com/softwaremill/sttp/UriInterpolatorTests.scala b/core/src/test/scala/com/softwaremill/sttp/UriInterpolatorTests.scala index f8d32ed..e417233 100644 --- a/core/src/test/scala/com/softwaremill/sttp/UriInterpolatorTests.scala +++ b/core/src/test/scala/com/softwaremill/sttp/UriInterpolatorTests.scala @@ -81,7 +81,9 @@ class UriInterpolatorTests extends FunSuite with Matchers { (uri"http://example.com/$v1/p/$v4", s"http://example.com/$v1/p/$v4encoded"), (uri"http://example.com/a/${List(v2, "c", v4)}/b", - s"http://example.com/a/$v2encoded/c/$v4encoded/b") + s"http://example.com/a/$v2encoded/c/$v4encoded/b"), + (uri"http://example.com/${"a/b/c".split('/')}", + s"http://example.com/a/b/c") ), "path with parameters" -> List( (uri"http://example.com/$v1?x=$v2", |