NET-A-PORTER/scala-uri

How do I remove a protocol / scheme from a URI?

Closed this issue · 1 comments

I'd like to create a protocol relative URL from an absolute URL, but I don't see a way to do that from the documentation. Is this possible?

Try this in the REPL:

import com.netaporter.uri._
val absoluteUri = Uri.parse("scheme://host/path")
val protocolRelativeUri = absoluteUri.copy(scheme=None)