All Downloads are FREE. Search and download functionalities are using the official Maven repository.

zio.http.URLPlatformSpecific.scala Maven / Gradle / Ivy

package zio.http

import scala.util.Try

trait URLPlatformSpecific {
  self: URL =>

  /**
   * Returns a new java.net.URL only if this URL represents an absolute
   * location.
   */
  def toJavaURL: Option[java.net.URL] =
    if (self.kind == URL.Location.Relative) None else Try(toJavaURI.toURL).toOption

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy