Skip to content

Commit

Permalink
Override URL's toString with encode (#2939)
Browse files Browse the repository at this point in the history
  • Loading branch information
guersam authored Jun 27, 2024
1 parent 7302676 commit 3a91fc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zio-http/shared/src/main/scala/zio/http/URL.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ final case class URL(
hash
}

override def toString(): String = encode

def host: Option[String] = kind match {
case URL.Location.Relative => None
case abs: URL.Location.Absolute => Option(abs.host)
Expand Down

0 comments on commit 3a91fc0

Please sign in to comment.