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 Created
response with a written body.Returns an HTTP
201 Created
response with a written body.- body
the response body, or the information needed to render the body
- def accepted: EnrichedResponse
Returns an HTTP
201 Created
response. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def badGateway: EnrichedResponse
Returns an HTTP
502 Bad Gateway
response. - def badRequest(body: Any): EnrichedResponse
Returns an HTTP
400 Bad Request
response with a written body.Returns an HTTP
400 Bad Request
response with a written body.- body
the response body, or the information needed to render the body
- def badRequest: EnrichedResponse
Returns an HTTP
400 Bad Request
response. - def clientClosed: EnrichedResponse
Returns an HTTP
499 Client Closed
response - 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 Conflict
response with a written body.Returns an HTTP
409 Conflict
response with a written body.- body
the response body, or the information needed to render the body
- def conflict: EnrichedResponse
Returns an HTTP
409 Conflict
response. - 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 Created
response with a written body.Returns an HTTP
201 Created
response with a written body.- body
the response body, or the information needed to render the body
- def created: EnrichedResponse
Returns an HTTP
201 Created
response. - 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 Forbidden
response with a written body.Returns an HTTP
403 Forbidden
response with a written body.- body
the response body, or the information needed to render the body
- def forbidden: EnrichedResponse
Returns an HTTP
403 Forbidden
response - def found: EnrichedResponse
Returns an HTTP
302 Found
response. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def gone(body: Any): EnrichedResponse
Returns an HTTP
410 Gone
response with a written body.Returns an HTTP
410 Gone
response with a written body.- body
the response body, or the information needed to render the body
- def gone: EnrichedResponse
Returns an HTTP
410 Gone
response - def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val htmlContentType: String
Representation of the
text/html
content 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/html
content 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 Error
response with a written body.Returns an HTTP
500 Internal Server Error
response 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 Error
response - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val jsonContentType: String
Representation of the
application/json
content 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/json
content 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 Allowed
response. - def movedPermanently(body: Any): EnrichedResponse
Returns an HTTP
301 Moved Permanently
response with a written bodyReturns an HTTP
301 Moved Permanently
response with a written body- body
the response body, or the information needed to render the body
- def movedPermanently: EnrichedResponse
Returns an HTTP
301 Moved Permanently
response. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noContent: EnrichedResponse
Returns an HTTP
204 No Content
response. - def notAcceptable(body: Any): EnrichedResponse
Returns an HTTP
406 Not Acceptable
response with a written body.Returns an HTTP
406 Not Acceptable
response with a written body.- body
the response body, or the information needed to render the body
- def notAcceptable: EnrichedResponse
Returns an HTTP
406 Not Acceptable
response. - def notFound(body: String): EnrichedResponse
Returns an HTTP
404 Not Found
response with a written String body.Returns an HTTP
404 Not Found
response with a written String body.- body
the response body as a String
- def notFound(body: Any): EnrichedResponse
Returns an HTTP
404 Not Found
response with a written body.Returns an HTTP
404 Not Found
response with a written body.- body
the response body, or the information needed to render the body
- def notFound: EnrichedResponse
Returns an HTTP
404 Not Found
response - def notImplemented: EnrichedResponse
Returns an HTTP
501 Not Implemented
response - def notModified: EnrichedResponse
Returns an HTTP
304 Not Modified
response. - 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 OK
response with a written String body.Returns an HTTP
200 OK
response with a written String body.- body
the response body as a String
- def ok(request: Request, body: Any): EnrichedResponse
Returns an HTTP
200 OK
response with a written body, potentially based on values contained within the com.twitter.finagle.http.Request.Returns an HTTP
200 OK
response 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
body
parameter requires custom message body rendering and values in theRequest
are required for decision making.
- def ok(body: Any): EnrichedResponse
Returns an HTTP
200 OK
response with a written body.Returns an HTTP
200 OK
response with a written body.- body
the response body, or the information needed to render the body
- def ok: EnrichedResponse
Returns an HTTP
200 OK
response. - val plainTextContentType: String
Representation of the
text/plain
content 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/plain
content 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 Failed
response with a written body.Returns an HTTP
412 Precondition Failed
response with a written body.- body
the response body, or the information needed to render the body
- def preconditionFailed: EnrichedResponse
Returns an HTTP
412 Precondition Failed
response - def requestEntityTooLarge(body: Any): EnrichedResponse
Returns an HTTP
413 Request Entity Too Large
response with a written body.Returns an HTTP
413 Request Entity Too Large
response 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 Large
response - def serviceUnavailable: EnrichedResponse
Returns an HTTP
503 Service Unavailable
response - 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 Redirect
response. - def toString(): String
- Definition Classes
- AnyRef → Any
- def unauthorized(body: Any): EnrichedResponse
Returns an HTTP
401 Unauthorized
response with a written body.Returns an HTTP
401 Unauthorized
response with a written body.- body
the response body, or the information needed to render the body
- def unauthorized: EnrichedResponse
Returns an HTTP
401 Unauthorized
response. - 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()