com.mle.android.http

BasicHttpClient

class BasicHttpClient extends AuthHttpClient

HTTP client that assumes the same endpoint is used for all requests.

Therefore modifies the methods so that only the resource, not the absolute URI, must be passed in when making requests.

Linear Supertypes
AuthHttpClient, JsonHttpClient, FutureHttpClient, Closeable, AutoCloseable, UtilLog, MleLog, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BasicHttpClient
  2. AuthHttpClient
  3. JsonHttpClient
  4. FutureHttpClient
  5. Closeable
  6. AutoCloseable
  7. UtilLog
  8. MleLog
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BasicHttpClient(endpoint: IEndpoint)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def addHeaders(headers: (String, String)*): Unit

    Definition Classes
    FutureHttpClient
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. val baseUrl: String

  9. def buildResponseHandler(promise: Promise[HttpResponse]): AsyncHttpResponseHandler

    Definition Classes
    FutureHttpClient
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def close(): Unit

    Definition Classes
    FutureHttpClient → Closeable → AutoCloseable
  12. def debug(msg: ⇒ String): Unit

    Definition Classes
    MleLog
  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def err(msg: ⇒ String): Unit

    Definition Classes
    MleLog
  16. def failMessage(e: Throwable, stackTrace: Boolean = true): String

    Attributes
    protected
    Definition Classes
    MleLog
  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def get[T](uri: String, f: (Promise[T]) ⇒ AsyncHttpResponseHandler): Future[T]

    Definition Classes
    FutureHttpClient
  19. def get(uri: String): Future[HttpResponse]

    GETs uri.

    GETs uri.

    The returned Future fails with an java.io.IOException if the server cannot be reached, an UnauthorizedHttpException if authentication fails and a NotFoundHttpException if the server responds with a 404. For other errors it may fail with a HttpResponseException containing the appropriate error code.

    uri

    request uri

    returns

    the HTTP response following a successful request

    Definition Classes
    FutureHttpClient
  20. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  21. def getEmpty(uri: String): Future[Unit]

    Definition Classes
    FutureHttpClient
  22. def getJson[T](uri: String)(implicit fjs: Reads[T]): Future[T]

    HTTP GETs uri and maps the JSON in the response content to type T.

    HTTP GETs uri and maps the JSON in the response content to type T.

    The returned Future fails with a JsResultException if the non-empty response content fails to map to T. Empty responses fail with a AndroidException. May also fail with any exception get may fail with.

    T

    type of response

    uri

    uri to GET

    fjs

    JSON reader

    returns

    an instance of T

    Definition Classes
    JsonHttpClient
  23. def handleFailure(t: Throwable, maybeContent: Option[String]): Throwable

    Definition Classes
    FutureHttpClient
  24. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  25. val httpClient: AsyncHttpClient

    Definition Classes
    FutureHttpClient
  26. val httpFailureHandler: PartialFunction[Throwable, Throwable]

    Definition Classes
    FutureHttpClient
  27. val httpFailureRefiner: PartialFunction[Throwable, Throwable]

    Definition Classes
    FutureHttpClient
  28. def info(msg: ⇒ String): Unit

    Definition Classes
    MleLog
  29. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. val passThroughHandler: PartialFunction[Throwable, Throwable]

    Definition Classes
    FutureHttpClient
  34. def post[T](ctx: Context, uri: String, json: JsValue, f: (Promise[T]) ⇒ AsyncHttpResponseHandler): Future[T]

    Definition Classes
    JsonHttpClient
  35. def post(ctx: Context, uri: String, json: JsValue): Future[HttpResponse]

    Definition Classes
    JsonHttpClient
  36. def postFile[T](uri: String, file: File, f: (Promise[T]) ⇒ AsyncHttpResponseHandler): Future[T]

    Performs a multipart/form-data upload of file.

    Performs a multipart/form-data upload of file.

    file

    file to upload

    Definition Classes
    FutureHttpClient
  37. def postFile(resource: String, file: File): Future[HttpResponse]

    Definition Classes
    FutureHttpClient
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  39. def tag: String

    Definition Classes
    UtilLogMleLog
  40. def toString(): String

    Definition Classes
    AnyRef → Any
  41. def transformUri(uri: String): String

    Gets called before the request is executed.

    Gets called before the request is executed.

    The default implementation trivially returns uri.

    uri

    the user-supplied uri string

    returns

    the uri actually used in the request

    Definition Classes
    BasicHttpClientFutureHttpClient
  42. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. def warn(msg: ⇒ String): Unit

    Definition Classes
    MleLog
  46. def warn(msg: ⇒ String, ex: Throwable): Unit

    Definition Classes
    MleLog

Inherited from AuthHttpClient

Inherited from JsonHttpClient

Inherited from FutureHttpClient

Inherited from Closeable

Inherited from AutoCloseable

Inherited from UtilLog

Inherited from MleLog

Inherited from AnyRef

Inherited from Any

Ungrouped