我正在使用Scala的Dispatch如下:
val body = """{"count":5,"requeue":true,"encoding":"auto","truncate":50000}"""
val req = url("http://localhost:4567/api/queues/%2f/myQueue/get").as_!("guest", "guest") << (body, "application/json")
val http = new Http
val resp = http(req as_str)
Run Code Online (Sandbox Code Playgroud)
在%2f
被变成了/
,所以它会试图张贴到/api/queues///myQueue/get
而不是/api/queues/%2f/myQueue/get
.
我该如何妥善逃脱?