object ServerResponse
- Alphabetic
- By Inheritance
- ServerResponse
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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 FileResponse(file: File): ServerResponse
- def HTMLResponse(text: String): ServerResponse
- def JsonResponse(content: JSON): ServerResponse
-
def
ResourceResponse(path: String): ServerResponse
an MMT resource
an MMT resource
- path
path of File to be sent back
- def TextResponse(text: String, tp: String = "plain"): ServerResponse
- def XmlResponse(node: Node): ServerResponse
- def XmlResponse(text: String): ServerResponse
-
def
anyDataResponse(in: InputStream, extension: Option[String]): ServerResponse
creates a response from a file etc
creates a response from a file etc
- extension
file extension (only used to guess a content type)
-
def
apply(content: String, contentType: String, statusCode: Int = statusCodeOK): ServerResponse
Convenience method to construct a standard response
Convenience method to construct a standard response
- content
Textual message to be sent in the HTTP body
- contentType
contentType of the message to be returned
- statusCode
statusCode of the message
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
errorResponse(error: Error, format: String): ServerResponse
builds an error response from an error
-
def
errorResponse(msg: String, format: String = "html"): ServerResponse
builds an error response from an error message
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromJSON(content: JSON, statusCode: Int = statusCodeOK): ServerResponse
Convenience method to send application/json back to the client
Convenience method to send application/json back to the client
- content
JSON object to send back to the user
- statusCode
statusCode of the message
-
def
fromText(content: String, contentType: String = "plain", statusCode: Int = statusCodeOK): ServerResponse
Convenience method to send back a text/ response back to the client.
Convenience method to send back a text/ response back to the client.
- content
Textual message to be sent in the HTTP body
- contentType
Textual content type, will be returned as text/_ in the header
- statusCode
statusCode of the message
-
def
fromXML(content: Node, statusCode: Int = statusCodeOK): ServerResponse
Convenience method to send application/xml back to the client
Convenience method to send application/xml back to the client
- content
XML object to send back to the user
- statusCode
statusCode of the message
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val statusCodeBadGateway: Int
- val statusCodeBadRequest: Int
- val statusCodeForbidden: Int
- val statusCodeInternalServerError: Int
- val statusCodeMovedPermanently: Int
- val statusCodeNotFound: Int
- val statusCodeNotImplemented: Int
- val statusCodeOK: Int
- val statusCodePermanentRedirect: Int
- val statusCodeServiceUnavailable: Int
- val statusCodeTemporaryRedirect: Int
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()