Class

com.mle.android.http

BasicHttpClient

Related Doc: package http

Permalink

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
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BasicHttpClient(endpoint: IEndpoint)

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addHeaders(headers: (String, String)*): Unit

    Permalink
    Definition Classes
    FutureHttpClient
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. val baseUrl: String

    Permalink
  7. def clone(): AnyRef

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    MleLog
  14. def fileResponseHandler(file: File, promise: Promise[File]): FileAsyncHttpResponseHandler

    Permalink
    Definition Classes
    FutureHttpClient
  15. def finalize(): Unit

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

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

    Permalink

    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 cz.msebera.android.httpclient.client.HttpResponseException containing the appropriate error code.

    uri

    request uri

    returns

    the HTTP response following a successful request

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

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

    Permalink
    Definition Classes
    FutureHttpClient
  20. def getFile(uri: String, file: File): Future[File]

    Permalink
    Definition Classes
    FutureHttpClient
  21. def getJson[T](uri: String)(implicit arg0: Reads[T]): Future[T]

    Permalink

    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

    returns

    an instance of T

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

    Permalink
    Definition Classes
    FutureHttpClient
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. val httpClient: AsyncHttpClient

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

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

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

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

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

    Permalink

    Performs a multipart/form-data upload of file.

    Performs a multipart/form-data upload of file.

    file

    file to upload

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

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

    Permalink
    Definition Classes
    AnyRef
  38. def tag: String

    Permalink
    Definition Classes
    UtilLogMleLog
  39. def textResponseHandler(promise: Promise[HttpResponse]): TextHttpResponseHandler

    Permalink
    Definition Classes
    FutureHttpClient
  40. def toString(): String

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

    Permalink

    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(): Unit

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

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

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

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

    Permalink
    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