HttpReadsOption

uk.gov.hmrc.http.HttpReadsOption

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Implicits

Implicits

implicit def readOptionOfNotFound[A : HttpReads]: HttpReads[Option[A]]

An opinionated HttpReads which returns None for 404. This does not have any special treatment for 204, as did the previous version. If you need a None for any UpstreamErrorResponse, consider using:

An opinionated HttpReads which returns None for 404. This does not have any special treatment for 204, as did the previous version. If you need a None for any UpstreamErrorResponse, consider using:

HttpReads[Either[UpstreamErrorResponse, A]].map(_.toOption)

Attributes