AsyncResponse

fm.http.client.AsyncResponse
See theAsyncResponse companion object
final class AsyncResponse(response: HttpResponse, content: LinkedHttpContentReader)(implicit execution: ExecutionContext) extends Response with Logging

Represents a Response where the body of the response can be read asynchronously (which means it can be much larger than available heap)

Attributes

Companion:
object
Graph
Supertypes
trait Logging
class Response
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def close(): Unit
def close(t: Throwable): Unit
def completed: Future[Unit]

This future is completed when the request has been fully processed

This future is completed when the request has been fully processed

Attributes

def isContentFullyRead: Boolean
def readBodyToByteArray(maxLength: Long): Future[Array[Byte]]
def readBodyToString(maxLength: Long, defaultCharset: Charset): Future[String]
def toFullResponse(maxLength: Long): Future[FullResponse]
def toFullStringResponse(maxLength: Long, defaultCharset: Charset): Future[FullStringResponse]

Inherited methods

def contentLength: Option[Long]

The Content-Length of the request body (if known)

The Content-Length of the request body (if known)

Attributes

Inherited from:
Response

Attributes

Inherited from:
Response
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Response -> Any
Inherited from:
Response

Concrete fields

val hasBody: Boolean

Should this response contain a non-empty body?

Should this response contain a non-empty body?

Attributes

Inherited fields

val cookies: Vector[Cookie]

Any Set-Cookie Headers are decoded into Cookies

Any Set-Cookie Headers are decoded into Cookies

Attributes

Inherited from:
Response

Attributes

Inherited from:
Response

Attributes

Inherited from:
Response
val version: HttpVersion

Attributes

Inherited from:
Response