abstract class RequestProxy extends Request
Proxy for Request. This can be used to create a richer request class that wraps Request without exposing the underlying netty http type.
- Alphabetic
- By Inheritance
- RequestProxy
- Request
- Message
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new RequestProxy()
Concrete 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
accept: Seq[String]
Accept header
Accept header
- Definition Classes
- Message
-
def
acceptMediaTypes: Seq[String]
Accept header media types (normalized, no parameters)
Accept header media types (normalized, no parameters)
- Definition Classes
- Message
-
def
accept_=(values: Iterable[String]): Unit
Set Accept header with list of values
Set Accept header with list of values
- Definition Classes
- Message
-
def
accept_=(value: String): Unit
Set Accept header
Set Accept header
- Definition Classes
- Message
-
def
addCookie(cookie: Cookie): Unit
Add a cookie
Add a cookie
- Definition Classes
- Message
-
def
allow: Option[String]
Allow header
Allow header
- Definition Classes
- Message
-
def
allow_=(values: Iterable[Method]): Unit
Set Authorization header
Set Authorization header
- Definition Classes
- Message
-
def
allow_=(value: String): Unit
Set Authorization header
Set Authorization header
- Definition Classes
- Message
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
authorization: Option[String]
Get Authorization header
Get Authorization header
- Definition Classes
- Message
-
def
authorization_=(value: String): Unit
Set Authorization header
Set Authorization header
- Definition Classes
- Message
-
def
cacheControl: Option[String]
Get Cache-Control header
Get Cache-Control header
- Definition Classes
- Message
-
def
cacheControl_=(maxAge: Duration): Unit
Set Cache-Control header with a max-age (and must-revalidate).
Set Cache-Control header with a max-age (and must-revalidate).
- Definition Classes
- Message
-
def
cacheControl_=(value: String): Unit
Set Cache-Control header
Set Cache-Control header
- Definition Classes
- Message
-
def
charset: Option[String]
Get charset from Content-Type header
Get charset from Content-Type header
- Definition Classes
- Message
-
def
charset_=(value: String): Unit
Set charset in Content-Type header.
Set charset in Content-Type header. This does not change the content.
- Definition Classes
- Message
-
def
clearContent(): Unit
Clear content (set to "").
Clear content (set to "").
- Definition Classes
- Message
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
close(): Future[Unit]
End the response stream.
End the response stream.
- Definition Classes
- Message
-
def
containsParam(name: String): Boolean
Check if parameter exists.
Check if parameter exists.
- Definition Classes
- Request
-
final
def
content(content: Buf): RequestProxy.this.type
Set the content of this
Message.Set the content of this
Message.Any existing content is discarded. If this
Messageis set to chunked, anIllegalStateExceptionis thrown.- Definition Classes
- Message
- Annotations
- @throws( ... )
- See also
content_=(Buf) for Scala users
-
def
content: Buf
Retrieve the current content of this
Message.Retrieve the current content of this
Message.If this message is chunked, the resulting
Bufwill always be empty.- Definition Classes
- Message
-
def
contentLength: Option[Long]
Get Content-Length header.
Get Content-Length header. Use length to get the length of actual content.
- Definition Classes
- Message
-
def
contentLength_=(value: Long): Unit
Set Content-Length header.
Set Content-Length header. Normally, this is automatically set by the Codec, but this method allows you to override that.
- Definition Classes
- Message
-
def
contentString: String
Get the content as a string.
Get the content as a string.
- Definition Classes
- Message
-
def
contentString_=(value: String): Unit
Set the content as a string.
Set the content as a string.
- Definition Classes
- Message
-
def
contentType: Option[String]
Get Content-Type header
Get Content-Type header
- Definition Classes
- Message
-
def
contentType_=(value: String): Unit
Set Content-Type header
Set Content-Type header
- Definition Classes
- Message
-
def
content_=(content: Buf): Unit
Set the content of this
Message.Set the content of this
Message.Any existing content is discarded. If this
Messageis set to chunked, anIllegalStateExceptionis thrown.- Definition Classes
- Message
- Annotations
- @throws( ... )
- See also
content(Buf) for Java users
-
lazy val
cookies: CookieMap
Cookies.
Cookies. In a request, this uses the Cookie headers. In a response, it uses the Set-Cookie headers.
- Definition Classes
- Message
-
def
ctx: Record
Arbitrary user-defined context associated with this request object.
Arbitrary user-defined context associated with this request object. RecordSchema.Record is used here, rather than Context or similar out-of-band mechanisms, to make the connection between the request and its associated context explicit.
- Definition Classes
- RequestProxy → Request
-
def
date: Option[String]
Get Date header
Get Date header
- Definition Classes
- Message
-
def
date_=(value: Date): Unit
Set Date header by Date
Set Date header by Date
- Definition Classes
- Message
-
def
date_=(value: String): Unit
Set Date header
Set Date header
- Definition Classes
- Message
-
def
encodeBytes(): Array[Byte]
Encode an HTTP message to Array[Byte]
Encode an HTTP message to Array[Byte]
- Definition Classes
- Request
-
def
encodeString(): String
Encode an HTTP message to String.
Encode an HTTP message to String.
- Definition Classes
- Request
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
expires: Option[String]
Get Expires header
Get Expires header
- Definition Classes
- Message
-
def
expires_=(value: Date): Unit
Set Expires header by Date
Set Expires header by Date
- Definition Classes
- Message
-
def
expires_=(value: String): Unit
Set Expires header
Set Expires header
- Definition Classes
- Message
-
def
fileExtension: String
File extension.
File extension. Empty string if none.
- Definition Classes
- Request
- Annotations
- @BeanProperty()
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
getBooleanParam(name: String, default: Boolean): Boolean
Get Boolean param.
Get Boolean param. Returns value or default.
- Definition Classes
- Request
-
def
getBooleanParam(name: String): Boolean
Get Boolean param.
Get Boolean param. Returns value or false.
- Definition Classes
- Request
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getContentString(): String
- Definition Classes
- Message
-
def
getCookies(): Iterator[Cookie]
Get iterator over Cookies
Get iterator over Cookies
- Definition Classes
- Message
-
def
getInputStream(): InputStream
Get InputStream for content.
Get InputStream for content. Caller must close. (Java interface. Scala users should use withInputStream.)
- Definition Classes
- Message
-
def
getIntParam(name: String, default: Int): Int
Get Int param.
Get Int param. Returns value or default.
- Definition Classes
- Request
-
def
getIntParam(name: String): Int
Get Int param.
Get Int param. Returns value or 0.
- Definition Classes
- Request
-
def
getLength(): Int
- Definition Classes
- Message
-
def
getLongParam(name: String, default: Long): Long
Get Long param.
Get Long param. Returns value or default.
- Definition Classes
- Request
-
def
getLongParam(name: String): Long
Get Long param.
Get Long param. Returns value or 0.
- Definition Classes
- Request
-
def
getParam(name: String, default: String): String
Get parameter value.
Get parameter value. Returns value or default.
- Definition Classes
- Request
-
def
getParam(name: String): String
Get parameter value.
Get parameter value. Returns value or null.
- Definition Classes
- Request
-
def
getParamNames(): Set[String]
Get parameters names.
Get parameters names.
- Definition Classes
- Request
-
def
getParams(): List[Entry[String, String]]
Get all parameters.
Get all parameters.
- Definition Classes
- Request
-
def
getParams(name: String): List[String]
Get all values of parameter.
Get all values of parameter. Returns list of values.
- Definition Classes
- Request
-
def
getReader(): Reader
Get Reader for content.
Get Reader for content. (Java interface. Scala users should use withReader.)
- Definition Classes
- Message
-
def
getShortParam(name: String, default: Short): Short
Get Short param.
Get Short param. Returns value or default.
- Definition Classes
- Request
-
def
getShortParam(name: String): Short
Get Short param.
Get Short param. Returns value or 0.
- Definition Classes
- Request
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
lazy val
headerMap: HeaderMap
- Definition Classes
- Message
-
def
host: Option[String]
Get Host header
Get Host header
- Definition Classes
- Message
-
def
host_=(value: String): Unit
Set Host header
Set Host header
- Definition Classes
- Message
-
def
httpRequest: HttpRequest
- Attributes
- protected[com.twitter.finagle]
- Definition Classes
- RequestProxy → Request
-
def
isChunked: Boolean
- Definition Classes
- Message
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isRequest: Boolean
-
def
isResponse: Boolean
- Definition Classes
- Message
-
def
isXmlHttpRequest: Boolean
Check if X-Requested-With contains XMLHttpRequest, usually signalling a request from a JavaScript AJAX libraries.
Check if X-Requested-With contains XMLHttpRequest, usually signalling a request from a JavaScript AJAX libraries. Some servers treat these requests specially. For example, an endpoint might render JSON or XML instead HTML if it's an XmlHttpRequest. (Tip: don't do this - it's gross.)
- Definition Classes
- Message
-
def
lastModified: Option[String]
Get Last-Modified header
Get Last-Modified header
- Definition Classes
- Message
-
def
lastModified_=(value: Date): Unit
Set Last-Modified header by Date
Set Last-Modified header by Date
- Definition Classes
- Message
-
def
lastModified_=(value: String): Unit
Set Last-Modified header
Set Last-Modified header
- Definition Classes
- Message
-
def
length: Int
Get length of content.
Get length of content.
- Definition Classes
- Message
-
def
location: Option[String]
Get Location header
Get Location header
- Definition Classes
- Message
-
def
location_=(value: String): Unit
Set Location header
Set Location header
- Definition Classes
- Message
-
def
mediaType: Option[String]
Get media-type from Content-Type header
Get media-type from Content-Type header
- Definition Classes
- Message
-
def
mediaType_=(value: String): Unit
Set media-type in Content-Type header.
Set media-type in Content-Type header. Charset and parameter values are preserved, though may not be appropriate for the new media type.
- Definition Classes
- Message
-
def
method: Method
Returns the HTTP method of this request.
Returns the HTTP method of this request.
- Definition Classes
- Request
-
def
method_=(method: Method): Unit
Sets the HTTP method of this request to the given
method.Sets the HTTP method of this request to the given
method.- Definition Classes
- Request
-
def
multipart: Option[Multipart]
Returns an _optional_ Multipart instance, which maintains the
multipart/form-datacontent of this non-chunked, POST request.Returns an _optional_ Multipart instance, which maintains the
multipart/form-datacontent of this non-chunked, POST request. If this requests is either streaming or non-POST, this method returnsNone.Note: This method is a part of an experimental API for handling multipart HTTP data and it will likely be changed in future in order to support streaming requests.
- Definition Classes
- Request
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
params: ParamMap
Returns a ParamMap instance, which maintains query string and url-encoded params associated with this request.
Returns a ParamMap instance, which maintains query string and url-encoded params associated with this request.
- Definition Classes
- RequestProxy → Request
-
def
path: String
Path from URI.
Path from URI.
- Definition Classes
- Request
- Annotations
- @BeanProperty()
-
def
reader: Reader
A read-only handle to the internal stream of bytes, representing the message body.
A read-only handle to the internal stream of bytes, representing the message body. See com.twitter.io.Reader for more information.
- Definition Classes
- RequestProxy → Message
-
def
referer: Option[String]
Get Referer [sic] header
Get Referer [sic] header
- Definition Classes
- Message
-
def
referer_=(value: String): Unit
Set Referer [sic] header
Set Referer [sic] header
- Definition Classes
- Message
-
def
remoteAddress: InetAddress
Remote InetAddress
Remote InetAddress
- Definition Classes
- Request
- Annotations
- @BeanProperty()
-
def
remoteHost: String
Remote host - a dotted quad
Remote host - a dotted quad
- Definition Classes
- Request
- Annotations
- @BeanProperty()
-
def
remotePort: Int
Remote port
Remote port
- Definition Classes
- Request
- Annotations
- @BeanProperty()
-
def
remoteSocketAddress: InetSocketAddress
The InetSocketAddress of the client or a place-holder ephemeral address for requests that have yet to be dispatched.
The InetSocketAddress of the client or a place-holder ephemeral address for requests that have yet to be dispatched.
- Definition Classes
- RequestProxy → Request
-
def
removeCookie(name: String): Unit
Remove a cookie
Remove a cookie
- Definition Classes
- Message
-
lazy val
response: Response
Response associated with request.
Response associated with request.
- Definition Classes
- RequestProxy → Request
-
def
retryAfter: Option[String]
Get Retry-After header
Get Retry-After header
- Definition Classes
- Message
-
def
retryAfter_=(value: Long): Unit
Set Retry-After header by seconds
Set Retry-After header by seconds
- Definition Classes
- Message
-
def
retryAfter_=(value: String): Unit
Set Retry-After header
Set Retry-After header
- Definition Classes
- Message
-
def
server: Option[String]
Get Server header
Get Server header
- Definition Classes
- Message
-
def
server_=(value: String): Unit
Set Server header
Set Server header
- Definition Classes
- Message
-
def
setChunked(chunked: Boolean): Unit
Manipulate the
Messagecontent mode.Manipulate the
Messagecontent mode.If
chunkedistrue, any existing content will be discarded and further attempts to manipulate the synchronous content will result in anIllegalStateException.If
chunkedisfalse, the synchronous content methods will become available and theReader/Writerof the message will be ignored by finagle.- Definition Classes
- Message
-
def
setContentString(value: String): Unit
- Definition Classes
- Message
-
def
setContentType(mediaType: String, charset: String = "utf-8"): Unit
Set Content-Type header by media-type and charset
Set Content-Type header by media-type and charset
- Definition Classes
- Message
-
def
setContentTypeJson(): Unit
Set Content-Type header to application/json;charset=utf-8
Set Content-Type header to application/json;charset=utf-8
- Definition Classes
- Message
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Request → AnyRef → Any
-
final
def
uri(value: String): RequestProxy.this.type
Set the URI of this request.
Set the URI of this request.
- Definition Classes
- Request
- See also
uri_=(String) for Scala users.
-
def
uri: String
Returns the URI of this request.
Returns the URI of this request.
- Definition Classes
- Request
-
def
uri_=(uri: String): Unit
Set the URI of this request to the given
uri.Set the URI of this request to the given
uri.- Definition Classes
- Request
- See also
uri(String) for Java users.
-
def
userAgent: Option[String]
Get User-Agent header
Get User-Agent header
- Definition Classes
- Message
-
def
userAgent_=(value: String): Unit
Set User-Agent header
Set User-Agent header
- Definition Classes
- Message
-
def
version: Version
- Definition Classes
- Message
-
def
version_=(version: Version): Unit
- Definition Classes
- Message
-
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( ... )
-
def
withInputStream[T](f: (InputStream) ⇒ T): T
Use content as InputStream.
Use content as InputStream. The underlying channel buffer's reader index is advanced. (Scala interface. Java users can use getInputStream().)
- Definition Classes
- Message
-
def
withOutputStream[T](f: (OutputStream) ⇒ T): T
Append content via an OutputStream.
Append content via an OutputStream.
An
IllegalStateExceptionis thrown if this message is chunked.- Definition Classes
- Message
- Annotations
- @throws( classOf[IllegalStateException] )
-
def
withReader[T](f: (Reader) ⇒ T): T
Use content as Reader.
Use content as Reader. (Scala interface. Java usrs can use getReader().)
- Definition Classes
- Message
-
def
withWriter[T](f: (Writer) ⇒ T): T
Append content via a Writer.
Append content via a Writer.
An
IllegalStateExceptionis thrown if this message is chunked.- Definition Classes
- Message
- Annotations
- @throws( classOf[IllegalStateException] )
-
def
write(bytes: Array[Byte]): Unit
Append bytes to content.
Append bytes to content.
This method makes a defensive copy of the provided byte array. This can be avoided by wrapping the byte array via
Buf.ByteArray.Ownedand using thewrite(Buf)method.An
IllegalStateExceptionis thrown if this message is chunked.- Definition Classes
- Message
- Annotations
- @throws( classOf[IllegalStateException] )
-
def
write(buf: Buf): Unit
Append a Buf to content.
Append a Buf to content.
An
IllegalStateExceptionis thrown if this message is chunked.- Definition Classes
- Message
- Annotations
- @throws( classOf[IllegalStateException] )
-
def
write(string: String): Unit
Append string to content.
Append string to content.
An
IllegalStateExceptionis thrown if this message is chunked.- Definition Classes
- Message
- Annotations
- @throws( classOf[IllegalStateException] )
-
def
writer: Writer with Closable
A write-only handle to the internal stream of bytes, representing the message body.
A write-only handle to the internal stream of bytes, representing the message body. See com.twitter.io.Writer for more information.
- Definition Classes
- RequestProxy → Message
-
def
wwwAuthenticate: Option[String]
Get WWW-Authenticate header
Get WWW-Authenticate header
- Definition Classes
- Message
-
def
wwwAuthenticate_=(value: String): Unit
Set WWW-Authenticate header
Set WWW-Authenticate header
- Definition Classes
- Message
-
def
xForwardedFor: Option[String]
Get X-Forwarded-For header
Get X-Forwarded-For header
- Definition Classes
- Message
-
def
xForwardedFor_=(value: String): Unit
Set X-Forwarded-For header
Set X-Forwarded-For header
- Definition Classes
- Message
Deprecated Value Members
-
def
getContent(): ChannelBuffer
- Attributes
- protected
- Definition Classes
- Message
- Annotations
- @deprecated
- Deprecated
(Since version 2017-01-23) Use content instead
-
def
getHttpRequest(): HttpRequest
- Attributes
- protected[com.twitter.finagle]
- Definition Classes
- Request
- Annotations
- @deprecated
- Deprecated
(Since version 2017-01-26) Going away as part of the Netty 4 transition
-
def
getMethod(): HttpMethod
- Attributes
- protected[com.twitter.finagle]
- Definition Classes
- Request
- Annotations
- @deprecated
- Deprecated
(Since version 2017-01-26) Going away as part of the Netty 4 transition
-
def
getResponse(): Response
Get response associated with request.
Get response associated with request.
- Definition Classes
- Request
- Annotations
- @deprecated
- Deprecated
(Since version 2016-12-29) Use the Response constructor functions
-
def
getUri(): String
- Attributes
- protected[com.twitter.finagle]
- Definition Classes
- Request
- Annotations
- @deprecated
- Deprecated
(Since version 2017-01-26) Use
uriinstead.
-
def
headers(): HttpHeaders
- Attributes
- protected
- Definition Classes
- Message
- Annotations
- @deprecated
- Deprecated
(Since version 2017-01-24) Use headerMap instead
-
def
httpMessage: HttpMessage
- Attributes
- protected[com.twitter.finagle]
- Definition Classes
- Request → Message
- Annotations
- @deprecated
- Deprecated
(Since version 2017-01-26) Going away as part of the Netty 4 transition
-
def
setContent(content: ChannelBuffer): Unit
- Attributes
- protected
- Definition Classes
- Message
- Annotations
- @deprecated @throws( ... )
- Deprecated
(Since version 2017-01-23) Use content(Buf) instead
-
def
setMethod(method: HttpMethod): Unit
- Attributes
- protected[com.twitter.finagle]
- Definition Classes
- Request
- Annotations
- @deprecated
- Deprecated
(Since version 2017-01-26) Going away as part of the Netty 4 transition
-
def
setUri(uri: String): Unit
- Attributes
- protected[com.twitter.finagle]
- Definition Classes
- Request
- Annotations
- @deprecated
- Deprecated
(Since version 2017-01-26) Use
uri(String)instead.