
WebReq encapsulates a web request.
Slots
- form
-
abstract Str:Str form()
Get the key/value pairs of the form data. If the request content type is "application/x-www-form-urlencoded", then the first time this method is called the request content is read and parsed using
sys::Uri.decodeQuery
. If the content type is not "application/x-www-form-urlencoded" this method returns null. - headers
-
abstract Str:Str headers()
Map of HTTP request headers. This Map is readonly and case insenstive (see
sys::Map.caseInsensitive
). - in
-
abstract InStream in()
The InStream for this request.
- method
-
abstract Str method()
The HTTP request method in uppercase. Example: GET, POST, PUT.
- prefixUri
-
abstract Uri prefixUri()
The prefixUri is the portion of the request URI controlled by the web server. A prefixUri always ends with a trailing slash.
uri == prefixUri + suffixUri
Examples:
uri: http://www.foo.com/a/b/c
prefixUri: http://www.foo.com/a/ suffixUri: b/c uri: http://www.foo.com/a/b/c prefixUri: http://www.foo.com/ suffixUri: a/b/c uri: http://www.foo.com/a/b/c?q=bar prefixUri: http://www.foo.com/a/b/ suffixUri: c?q=bar
- resource
-
Resource resource { internal set }
The Resource resolved by the uri.
- service
-
abstract WebService service()
Get the WebService managing the request.
- stash
-
abstract Str:Obj stash()
Stash allows you to stash objects on the WebReq object in order to pass data b/w Weblets on the same request.
- suffixUri
-
abstract Uri suffixUri()
The suffixUri is the portion of the request URI not controlled by the web server. The suffixUri will always starts after the trailing slash of the prefixUri.
uri == prefixUri + suffixUri
Examples:
uri: http://www.foo.com/a/b/c
prefixUri: http://www.foo.com/a/ suffixUri: b/c uri: http://www.foo.com/a/b/c prefixUri: http://www.foo.com/ suffixUri: a/b/c uri: http://www.foo.com/a/b/c?q=bar prefixUri: http://www.foo.com/a/b/ suffixUri: c?q=bar
- uri
-
abstract Uri uri()
The request URI.
Examples:
http://www.foo.com/a/b/c http://www.foo.com/a?q=bar
- userAgent
-
abstract UserAgent userAgent()
The UserAgent for this request or null if the "User-Agent" header was not specified in the request.
- version
-
abstract Version version()
The HTTP version of the request.