Hi,
apparently, the behaviour of <<? changed from 0.8 to 0.9 in the aspect
that in 0.8, "req <<? params" returned a new request with the given
query parameters. In 0.9, it's apparently the *same* request object
with the given parameters set.
scala> val req = url("
http://example.com")
req: com.ning.http.client.RequestBuilder =
com.ning.http.client.RequestBuilder@66a008
scala> val reqWithParams1 = req <<? Map("foo" -> "bar")
reqWithParams1: com.ning.http.client.RequestBuilder =
com.ning.http.client.RequestBuilder@66a008
scala> reqWithParams1.url
res0: java.lang.String =
http://example.com/?foo=bar
scala> val reqWithParams2 = req <<? Map("some" -> "thing")
reqWithParams2: com.ning.http.client.RequestBuilder =
com.ning.http.client.RequestBuilder@66a008
scala> reqWithParams2.url
res1: java.lang.String =
http://example.com/?foo=bar&some=thing
Of course, it is possible to work around that by saying "def" instead of
"val" everywhere, but I think that behaviour is so un-Scala-ish that it
must at least be mentioned in the docs, but IMO it would be even better
if <<? (and related methods) returned a *new* RequestBuilder object.
Kind regards
Tobias