-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
cc @stacycurl
I have to construct the query params my self, if I use formParameters on a request it doesn't seem to work (I get 404).
def get(uri: String, params: Map[String, String]): Future[Response] = {
val formParams: List[FormParameter] = params.map(kv => FormParameter(kv._1, kv._2)).toList
val paramSuffix: String = if (params.isEmpty) "" else s"?${params.map(kv => kv._1 + "=" + kv._2).mkString("&")}"
Future {
// Works
http(
GET(uri + paramSuffix)
)
// Not work
http(
GET(uri)
.formParameters(formParams: _*),
)
}
}
Also FormParameter seems like a fairly redundant type, could just use Map[String, String]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels