Class HttpRequest
Represents an HTTP request received by a Sisk server.
public sealed class HttpRequest
- Inheritance
-
HttpRequest
- Inherited Members
Properties
- Authority
Get the requested host header with the port from this HTTP request.
- Bag
Gets the managed object which holds data for an entire HTTP session.
- Body
Gets the HTTP request body as string, decoded by the request content encoding.
- ContentLength
Gets the content length in bytes count.
- Context
Gets the HttpContext for this request.
- Cookies
Gets an StringKeyStore object with all cookies set in this request.
- FullPath
Gets the raw, full HTTP request path with the query string.
- FullUrl
Gets the full URL for this request, with scheme, host, port, path and query.
- HasContents
Gets a boolean indicating whether this request has body contents.
- Headers
Gets the HTTP request headers.
- Host
Get the requested host (without port) for this HttpRequest.
- IsContentAvailable
Gets a boolean indicating whether this request has body contents and whether it has already been read into memory by the server.
- IsSecure
Gets a boolean indicating whether this request was locally made by an secure transport context (SSL/TLS) or not.
- Method
Gets the HTTP request method.
- Path
Gets the HTTP request path without the query string.
- Query
Gets the HTTP request query value collection.
- QueryString
Gets the HTTP request URL raw query string, including the '?' char.
- RawBody
Gets the HTTP request body as a byte array.
- RemoteAddress
Gets the incoming local IP address from the request.
- RequestEncoding
Gets an string Encoding that can be used to decode text in this HTTP request.
- RequestId
Gets a unique random ID for this request.
- RequestedAt
Gets the moment which the request was received by the server.
- RouteParameters
Gets the StringValueCollection object which represents the current route parameters.
- Uri
Gets the System.Uri component for this HTTP request requested URL.
Methods
- GetEventSource(string?)
Gets an Event Source interface for this request. Calling this method will put this HttpRequest instance in it's event source listening state.
- GetFormContent()
Reads the request body and extracts form data parameters from it.
- GetMultipartFormContent()
Reads the request body and obtains a MultipartFormCollection from it.
- GetRawHttpRequest(bool, bool)
Gets a visual representation of this request.
- GetRequestStream()
Gets the HTTP request content stream. This property is only available while the content has not been imported by the HTTP server and will invalidate the body content cached in this object.
- GetResponseStream()
Gets an HTTP response stream for this HTTP request.
- GetWebSocket(string?, string?)
Accepts and acquires a websocket for this request. Calling this method will put this HttpRequest instance in streaming state.
- SendTo(RouteAction)
Calls another handler for this request, preserving the current call-stack frame, and then returns the response from it. This method manages to prevent possible stack overflows.
- ToString()
Gets an string representation of this HttpRequest object.