class ResponseBuilder extends AnyRef
- Alphabetic
- By Inheritance
- ResponseBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ResponseBuilder(objectMapper: ScalaObjectMapper, fileResolver: FileResolver, messageBodyManager: MessageBodyManager, statsReceiver: StatsReceiver, includeContentTypeCharset: Boolean)
- Annotations
- @Inject()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def accepted(body: Any): EnrichedResponse
Returns an HTTP
201 Createdresponse with a written body.Returns an HTTP
201 Createdresponse with a written body.- body
the response body, or the information needed to render the body
- def accepted: EnrichedResponse
Returns an HTTP
201 Createdresponse. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def badGateway: EnrichedResponse
Returns an HTTP
502 Bad Gatewayresponse. - def badRequest(body: Any): EnrichedResponse
Returns an HTTP
400 Bad Requestresponse with a written body.Returns an HTTP
400 Bad Requestresponse with a written body.- body
the response body, or the information needed to render the body
- def badRequest: EnrichedResponse
Returns an HTTP
400 Bad Requestresponse. - def clientClosed: EnrichedResponse
Returns an HTTP
499 Client Closedresponse - def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def conflict(body: Any): EnrichedResponse
Returns an HTTP
409 Conflictresponse with a written body.Returns an HTTP
409 Conflictresponse with a written body.- body
the response body, or the information needed to render the body
- def conflict: EnrichedResponse
Returns an HTTP
409 Conflictresponse. - def create(response: Response): EnrichedResponse
Generic method to wrap a com.twitter.finagle.http.Response with this builder for augmenting the response.
Generic method to wrap a com.twitter.finagle.http.Response with this builder for augmenting the response.
- response
the com.twitter.finagle.http.Response to wrap.
- def created(body: Any): EnrichedResponse
Returns an HTTP
201 Createdresponse with a written body.Returns an HTTP
201 Createdresponse with a written body.- body
the response body, or the information needed to render the body
- def created: EnrichedResponse
Returns an HTTP
201 Createdresponse. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def forbidden(body: Any): EnrichedResponse
Returns an HTTP
403 Forbiddenresponse with a written body.Returns an HTTP
403 Forbiddenresponse with a written body.- body
the response body, or the information needed to render the body
- def forbidden: EnrichedResponse
Returns an HTTP
403 Forbiddenresponse - def found: EnrichedResponse
Returns an HTTP
302 Foundresponse. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def gone(body: Any): EnrichedResponse
Returns an HTTP
410 Goneresponse with a written body.Returns an HTTP
410 Goneresponse with a written body.- body
the response body, or the information needed to render the body
- def gone: EnrichedResponse
Returns an HTTP
410 Goneresponse - def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val htmlContentType: String
Representation of the
text/htmlcontent type governed by the includeContentTypeCharset Boolean which determines if the UTF-8 charset encoding parameter should be included in the content type.Representation of the
text/htmlcontent type governed by the includeContentTypeCharset Boolean which determines if the UTF-8 charset encoding parameter should be included in the content type.- See also
MessageBodyFlags
- def internalServerError(body: Any): EnrichedResponse
Returns an HTTP
500 Internal Server Errorresponse with a written body.Returns an HTTP
500 Internal Server Errorresponse with a written body.- body
the response body, or the information needed to render the body
- def internalServerError: EnrichedResponse
Returns an HTTP
500 Internal Server Errorresponse - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val jsonContentType: String
Representation of the
application/jsoncontent type governed by the includeContentTypeCharset Boolean which determines if the UTF-8 charset encoding parameter should be included in the content type.Representation of the
application/jsoncontent type governed by the includeContentTypeCharset Boolean which determines if the UTF-8 charset encoding parameter should be included in the content type.- See also
MessageBodyFlags
- def methodNotAllowed: EnrichedResponse
Returns an HTTP
405 Method Not Allowedresponse. - def movedPermanently(body: Any): EnrichedResponse
Returns an HTTP
301 Moved Permanentlyresponse with a written bodyReturns an HTTP
301 Moved Permanentlyresponse with a written body- body
the response body, or the information needed to render the body
- def movedPermanently: EnrichedResponse
Returns an HTTP
301 Moved Permanentlyresponse. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noContent: EnrichedResponse
Returns an HTTP
204 No Contentresponse. - def notAcceptable(body: Any): EnrichedResponse
Returns an HTTP
406 Not Acceptableresponse with a written body.Returns an HTTP
406 Not Acceptableresponse with a written body.- body
the response body, or the information needed to render the body
- def notAcceptable: EnrichedResponse
Returns an HTTP
406 Not Acceptableresponse. - def notFound(body: String): EnrichedResponse
Returns an HTTP
404 Not Foundresponse with a written String body.Returns an HTTP
404 Not Foundresponse with a written String body.- body
the response body as a String
- def notFound(body: Any): EnrichedResponse
Returns an HTTP
404 Not Foundresponse with a written body.Returns an HTTP
404 Not Foundresponse with a written body.- body
the response body, or the information needed to render the body
- def notFound: EnrichedResponse
Returns an HTTP
404 Not Foundresponse - def notImplemented: EnrichedResponse
Returns an HTTP
501 Not Implementedresponse - def notModified: EnrichedResponse
Returns an HTTP
304 Not Modifiedresponse. - final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def ok(body: String): EnrichedResponse
Returns an HTTP
200 OKresponse with a written String body.Returns an HTTP
200 OKresponse with a written String body.- body
the response body as a String
- def ok(request: Request, body: Any): EnrichedResponse
Returns an HTTP
200 OKresponse with a written body, potentially based on values contained within the com.twitter.finagle.http.Request.Returns an HTTP
200 OKresponse with a written body, potentially based on values contained within the com.twitter.finagle.http.Request.- request
the HTTP com.twitter.finagle.http.Request associated with this response
- body
the response body, or the information needed to render the body
- Note
This version is useful when the
bodyparameter requires custom message body rendering and values in theRequestare required for decision making.
- def ok(body: Any): EnrichedResponse
Returns an HTTP
200 OKresponse with a written body.Returns an HTTP
200 OKresponse with a written body.- body
the response body, or the information needed to render the body
- def ok: EnrichedResponse
Returns an HTTP
200 OKresponse. - val plainTextContentType: String
Representation of the
text/plaincontent type governed by the includeContentTypeCharset Boolean which determines if the UTF-8 charset encoding parameter should be included in the content type.Representation of the
text/plaincontent type governed by the includeContentTypeCharset Boolean which determines if the UTF-8 charset encoding parameter should be included in the content type.- See also
MessageBodyFlags
- def preconditionFailed(body: Any): EnrichedResponse
Returns an HTTP
412 Precondition Failedresponse with a written body.Returns an HTTP
412 Precondition Failedresponse with a written body.- body
the response body, or the information needed to render the body
- def preconditionFailed: EnrichedResponse
Returns an HTTP
412 Precondition Failedresponse - def requestEntityTooLarge(body: Any): EnrichedResponse
Returns an HTTP
413 Request Entity Too Largeresponse with a written body.Returns an HTTP
413 Request Entity Too Largeresponse with a written body.- body
the response body, or the information needed to render the body
- def requestEntityTooLarge: EnrichedResponse
Returns an HTTP
413 Request Entity Too Largeresponse - def serviceUnavailable: EnrichedResponse
Returns an HTTP
503 Service Unavailableresponse - def status(responseStatus: Status): EnrichedResponse
Returns a response with the given com.twitter.finagle.http.Status
Returns a response with the given com.twitter.finagle.http.Status
- responseStatus
the com.twitter.finagle.http.Status to set in the returned response
- def status(statusCode: Int): EnrichedResponse
Returns a response with the given status code.
Returns a response with the given status code.
- statusCode
the HTTP status code to set in the returned response
- def streaming[F[_], A](stream: F[A])(implicit arg0: ToReader[F], arg1: Manifest[A]): StreamingResponse[F, A]
Java support for streaming
- def streaming[F[_], A](stream: F[A], status: Status = Status.Ok, headers: Map[String, Seq[String]] = Map.empty)(implicit arg0: ToReader[F], arg1: Manifest[A]): StreamingResponse[F, A]
Create a StreamingResponse which can be converted to a com.twitter.finagle.http.Response later.
Create a StreamingResponse which can be converted to a com.twitter.finagle.http.Response later.
- F
The Primitive Stream type.
- A
The type of streaming values.
- stream
The output stream.
- status
Represents an HTTP status code.
- headers
A Map of message headers.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def temporaryRedirect: EnrichedResponse
Returns an HTTP
307 Temporary Redirectresponse. - def toString(): String
- Definition Classes
- AnyRef → Any
- def unauthorized(body: Any): EnrichedResponse
Returns an HTTP
401 Unauthorizedresponse with a written body.Returns an HTTP
401 Unauthorizedresponse with a written body.- body
the response body, or the information needed to render the body
- def unauthorized: EnrichedResponse
Returns an HTTP
401 Unauthorizedresponse. - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()