0
原料查詢參數,我試圖解析Referer
報頭包含原始URI字符串。如何解析查詢參數,在 的情況下,他們沒有編碼?最好的方法來分析在我目前使用<code>akka-http</code>斯卡拉
這裏的URI的例子:
import akka.http.scaladsl.model.Uri
Uri("https://foo.bar?b=x y").query().toMap
Uri("https://foo.bar?a=%%_1_%%").query().toMap
他們都將拋出IllegalUriException
。有沒有一種優雅的方式來做到這一點?
不完全。從[文檔】(http://doc.akka.io/docs/akka-http/10.0.9/scala/http/common/uri-model.html#obtaining-the-raw-request-uri)。這是利用把「原始」傳入URI來此的幀頭,和我所需要的 - 它是解析原始URI查詢地圖。 –