Packages

class Connection extends Closeable

Sends an HTTP Request and stores the Response. Clients should not send more than one request.

Example usage:


try (Connection connection = new Connection(url)) {
  Response response = connection.get(request);
  // ... process the response

}

Linear Supertypes
Closeable, AutoCloseable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Connection
  2. Closeable
  3. AutoCloseable
  4. AnyRef
  5. 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. def close(): Unit
    Definition Classes
    Connection → Closeable → AutoCloseable
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def get(request: Request): Response

    Sends the request with method GET.

    Sends the request with method GET.

    request

    the request to send

    returns

    the response to the sent request

    Exceptions thrown

    IOException if sending the request fails

  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def post(request: Request): Response

    Sends the request with method POST.

    Sends the request with method POST.

    request

    the request to send

    returns

    the response to the sent request

    Exceptions thrown

    IOException if sending the request fails

  18. def put(request: Request): Response

    Sends the request with method PUT.

    Sends the request with method PUT.

    request

    the request to send

    returns

    the response to the sent request

    Exceptions thrown

    IOException if sending the request fails

  19. def send(httpMethod: String, request: Request): Response

    Sends the request.

    Sends the request.

    httpMethod

    the HTTP request method

    request

    the request to send

    returns

    the response to the sent request

    Exceptions thrown

    IOException if building the HTTP request fails.

  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Closeable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped