Creating function: java.net.URL => spray.http.Uri

60 views
Skip to first unread message

Kevin Meredith

unread,
Aug 30, 2015, 8:30:11 PM8/30/15
to spray.io User List
Given an java.net.URL, how can I create a spray.http.uri?

Is there a better alternative than?

scala> new java.net.URL("http://www.google.com")

res2: java.net.URL = http://www.google.com


scala> spray.http.Uri(res2.toString)

res4: spray.http.Uri = http://www.google.com

Reply all
Reply to author
Forward
0 new messages