< Back
 

# Packages

-  package root
  Definition Classes
    root
-  package uk
  Definition Classes
    root
-  package gov
  Definition Classes
    uk
-  package hmrc
  Definition Classes
    gov
-  package http
  Definition Classes
    hmrc
-  object HttpReads extends HttpReadsLegacyInstances
  Definition Classes
    http
- Implicits

o

uk.gov.hmrc.http.HttpReads

# Implicits 

###

#### object Implicits extends HttpReadsInstances

Linear Supertypes
HttpReadsInstances, LowPriorityHttpReadsJson, HttpReadsJson, HttpReadsOption, HttpReadsTry, HttpReadsEither, HttpReadsHttpResponse, AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. Implicits
2. HttpReadsInstances
3. LowPriorityHttpReadsJson
4. HttpReadsJson
5. HttpReadsOption
6. HttpReadsTry
7. HttpReadsEither
8. HttpReadsHttpResponse
9. AnyRef
10. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
5.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @native() @throws( ... )
6.  final def eq(arg0: AnyRef): Boolean
   Definition Classes
     AnyRef
7.  def equals(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
8.  def finalize(): Unit
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( classOf[java.lang.Throwable] )
9.  final def getClass(): Class[_]
   Definition Classes
     AnyRef → Any
   Annotations
     @native()
10.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
11.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
12.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
13.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
14.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
15.  implicit def readEitherOf[A](implicit arg0: HttpReads[A]): HttpReads[Either[UpstreamErrorResponse, A]]
    Definition Classes
      HttpReadsEither
16.  implicit def readFromJson[A](implicit rds: Reads[A], mf: Manifest[A]): HttpReads[A]

    This is probably the typical instance to use, since all http calls occur within `Future`, allowing recovery.

    This is probably the typical instance to use, since all http calls occur within `Future`, allowing recovery.

    Definition Classes
      LowPriorityHttpReadsJson
    Annotations
      @throws( classOf[UpstreamErrorResponse] ) @throws( classOf[JsValidationException] )
17.  implicit def readJsResult[A](implicit arg0: Reads[A]): HttpReads[JsResult[A]]

    Note to read json regardless of error response - can define your own:

    Note to read json regardless of error response - can define your own:

        HttpReads[HttpResponse].map(_.json.validate[A])

    or custom behaviour - define your own:

        HttpReads[HttpResponse].map(response => response.status match {
          case 200   => Right(response.body.json.validate[A])
          case 400   => Right(response.body.json.validate[A])
          case other => Left(s"Invalid status code: $other")
        })

    Definition Classes
      HttpReadsJson
18.  implicit val readJsValue: HttpReads[JsValue]
    Definition Classes
      HttpReadsJson
19.  implicit def readOptionOfNotFound[A](implicit arg0: HttpReads[A]): HttpReads[Option[A]]

    An opinionated HttpReads which returns None for 404.

    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)

    Definition Classes
      HttpReadsOption
20.  implicit val readRaw: HttpReads[HttpResponse]

    returns the HttpResponse as is - you will be responsible for checking any status codes.

    returns the HttpResponse as is - you will be responsible for checking any status codes.

    Definition Classes
      HttpReadsHttpResponse
21.  implicit def readTryOf[A](implicit arg0: HttpReads[A]): HttpReads[Try[A]]
    Definition Classes
      HttpReadsTry
22.  implicit val readUnit: HttpReads[Unit]

    Ignores the response and returns Unit - useful for handling 204 etc.

    Ignores the response and returns Unit - useful for handling 204 etc. It can be combined with error handling types (e.g. `Either[UpstreamErrorResponse, Unit]`)

    Definition Classes
      HttpReadsHttpResponse
23.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
24.  def throwOnFailure[A](reads: HttpReads[Either[UpstreamErrorResponse, A]]): HttpReads[A]
    Definition Classes
      HttpReadsEither
25.  def toString(): String
    Definition Classes
      AnyRef → Any
26.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
27.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
28.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )

### Inherited from HttpReadsInstances

### Inherited from LowPriorityHttpReadsJson

### Inherited from HttpReadsJson

### Inherited from HttpReadsOption

### Inherited from HttpReadsTry

### Inherited from HttpReadsEither

### Inherited from HttpReadsHttpResponse

### Inherited from AnyRef

### Inherited from Any

### Ungrouped