Method | Description | |
---|---|---|
CachePrivate ( this res ) : IServerResponse |
Appends a "private" to the Cache-Control header to deny caching on shared caches.
|
|
CachePublic ( this res ) : IServerResponse |
Appends a "public" to the Cache-Control header to allow public cache to cache the resource
|
|
ETag ( this res, string tag ) : IServerResponse |
Set the ETag header.
|
|
GetCachedResponse ( this res ) : IServerResponse |
Gets the cached response that caches the data into a MemoryStream
|
|
MaxAge ( this res, int seconds ) : IServerResponse |
Sets the max-age part of the Cache-Control header
|
|
NoCache ( this res ) : IServerResponse |
Set the Cache-Control header to no-cache to enforce revalidation
|
|
Response201 ( this res, |
Response with the status code: 201 Created The request has been fulfilled and resulted in a new resource being created.
|
|
Response202 ( this res ) : IServerResponse |
Response with the status code: 202 Accepted The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. You might add additional data to the response body for the client to check the state of the operation.
|
|
Response204 ( this res ) : void |
Response with the status code: 204 No Content The server successfully processed the request, but is not returning any content
|
|
Response204 ( this res, System additinalHeaders ) : void |
Response with the status code: 204 No Content The server successfully processed the request, but is not returning any content
|
|
Response301 ( this res, |
Response with the status code: 301 Moved Permanently This and all future requests should be directed to the given URI. The client normally will issue a GET request to that url not matter what the original request was.
|
|
Response303 ( this res, |
Response with the status code: 303 See Other The response to the request can be found under another URI using a GET method. When received in response to a POST (or PUT/DELETE), it should be assumed that the server has received the data and the redirect should be issued with a separate GET message.
|
|
Response304 ( this res ) : void |
Response with the status code: 304 Not Modified Indicates the resource has not been modified since last requested. Typically, the HTTP client provides a header like the If-Modified-Since header to provide a time against which to compare. Using this saves bandwidth and reprocessing on both the server and client, as only the header data must be sent and received in comparison to the entirety of the page being re-processed by the server, then sent again using more bandwidth of the server and client.
|
|
Response307 ( this res, |
Response with the status code: 307 Temporary Redirect In this case, the request should be repeated with another URI; however, future requests should still use the original URI. In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request. For instance, a POST request repeated using another POST request.
|
|
Response400 ( this res ) : IServerResponse |
Response with the status code: 400 Bad Request The request cannot be fulfilled due to bad syntax.
|
|
Response401 ( this res ) : IServerResponse |
Response with the status code: 401 Unauthorized Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource. See Basic access authentication and Digest access authentication.
|
|
Response403 ( this res ) : void |
Response with the status code: 403 Forbidden The request was a valid request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference. On servers where authentication is required, this commonly means that the provided credentials were successfully authenticated but that the credentials still do not grant the client permission to access the resource (e.g. a recognized user attempting to access restricted content).
|
|
Response404 ( this res ) : void |
Response with the status code: 404 Not Found The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible.
|
|
Response405 ( this res ) : void |
Response with the status code: 405 Method Not Allowed A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.
|
|
Response409 ( this res ) : void |
Response with the status code: 409 Conflict Indicates that the request could not be processed because of conflict in the request, such as an edit conflict.
|
|
Response418 ( this res ) : void |
Response with the status code: 418 I'm a teapot (RFC 2324) This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, and is not expected to be implemented by actual HTTP servers.
|
|
Response451 ( this res ) : IServerResponse |
Response with the status code: 451 Unavailable For Legal Reasons (Internet draft) Defined in the internet draft "A New HTTP Status Code for Legally-restricted Resources". Intended to be used when resource access is denied for legal reasons, e.g. censorship or government-mandated blocked access. A reference to the 1953 dystopian novel Fahrenheit 451, where books are outlawed.
|
|
Response500 ( this res ) : IServerResponse |
Response with the status code: 500 Internal Server Error A generic error message, given when no more specific message is suitable.
|
|
Response500 ( this res, |
Response with the status code: 500 Internal Server Error A generic error message, given when no more specific message is suitable.
|
|
Response503 ( this res ) : IServerResponse |
Response with the status code: 503 Service Unavailable The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.
|
|
Response503 ( this res, |
Response with the status code: 503 Service Unavailable The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.
|
|
Response507 ( this res ) : IServerResponse |
Response with the status code: 507 Insufficient Storage The server is unable to store the representation needed to complete the request
|
|
ServeFile ( this res, string path ) : void |
Serves the given file to the client and closes the request when done.
|
|
ServeFile ( this res, string path, string mimeType ) : void |
Serves the given file to the client and closes the request when done.
|
|
Write ( this res, EncodingType type, byte data ) : IServerResponse |
Writes the specified byte data to the response
|
|
Write ( this res, string data ) : IServerResponse |
Writes the given string to the response
|
|
Write ( this res, string data, |
Writes the given string to the response
|
|
WriteAsJson ( this res, object obj ) : IServerResponse |
Writes the given object to the response as JSON
|
|
WriteAsJson ( this res, object obj, |
Writes the given object to the response as JSON
|
public static CachePrivate ( this res ) : IServerResponse | ||
res | this | The res. |
return | IServerResponse |
public static CachePublic ( this res ) : IServerResponse | ||
res | this | The res. |
return | IServerResponse |
public static ETag ( this res, string tag ) : IServerResponse | ||
res | this | The res. |
tag | string | The tag. |
return | IServerResponse |
public static GetCachedResponse ( this res ) : IServerResponse | ||
res | this | The res. |
return | IServerResponse |
public static MaxAge ( this res, int seconds ) : IServerResponse | ||
res | this | The res. |
seconds | int | The seconds. |
return | IServerResponse |
public static NoCache ( this res ) : IServerResponse | ||
res | this | The res. |
return | IServerResponse |
public static Response201 ( this res, |
||
res | this | The response to the client |
newLocation | The new location of the created resource | |
return | IServerResponse |
public static Response202 ( this res ) : IServerResponse | ||
res | this | The response to the client |
return | IServerResponse |
public static Response204 ( this res ) : void | ||
res | this | The response to the client |
return | void |
public static Response204 ( this res, System additinalHeaders ) : void | ||
res | this | The response to the client |
additinalHeaders | System | The additional headers. |
return | void |
public static Response301 ( this res, |
||
res | this | The response to the client |
newLocation | The new location. | |
return | void |
public static Response303 ( this res, |
||
res | this | The response to the client |
other | The other location. | |
return | void |
public static Response304 ( this res ) : void | ||
res | this | The response to the client |
return | void |
public static Response307 ( this res, |
||
res | this | The response to the client |
newLocation | The new location. | |
return | void |
public static Response400 ( this res ) : IServerResponse | ||
res | this | The response to the client |
return | IServerResponse |
public static Response401 ( this res ) : IServerResponse | ||
res | this | The response to the client |
return | IServerResponse |
public static Response403 ( this res ) : void | ||
res | this | The response to the client |
return | void |
public static Response404 ( this res ) : void | ||
res | this | The response to the client |
return | void |
public static Response405 ( this res ) : void | ||
res | this | The response to the client |
return | void |
public static Response409 ( this res ) : void | ||
res | this | The response to the client |
return | void |
public static Response418 ( this res ) : void | ||
res | this | The response to the client |
return | void |
public static Response451 ( this res ) : IServerResponse | ||
res | this | The response to the client |
return | IServerResponse |
public static Response500 ( this res ) : IServerResponse | ||
res | this | The response to the client |
return | IServerResponse |
public static Response500 ( this res, |
||
res | this | The response to the client |
ex | The ex. | |
return | IServerResponse |
public static Response503 ( this res ) : IServerResponse | ||
res | this | The response to the client |
return | IServerResponse |
public static Response503 ( this res, |
||
res | this | The response to the client |
ex | The ex. | |
return | IServerResponse |
public static Response507 ( this res ) : IServerResponse | ||
res | this | The response to the client |
return | IServerResponse |
public static ServeFile ( this res, string path ) : void | ||
res | this | The res. |
path | string | The path. |
return | void |
public static ServeFile ( this res, string path, string mimeType ) : void | ||
res | this | The res. |
path | string | The path. |
mimeType | string | Type of the MIME type. |
return | void |
public static Write ( this res, EncodingType type, byte data ) : IServerResponse | ||
res | this | The res. |
type | EncodingType | The type. |
data | byte | The data. |
return | IServerResponse |
public static Write ( this res, string data ) : IServerResponse | ||
res | this | The res. |
data | string | The data. |
return | IServerResponse |
public static Write ( this res, string data, |
||
res | this | The res. |
data | string | The data. |
charset | The charset. | |
encoding | EncodingType | The encoding. |
return | IServerResponse |
public static WriteAsJson ( this res, object obj ) : IServerResponse | ||
res | this | The res. |
obj | object | The obj. |
return | IServerResponse |
public static WriteAsJson ( this res, object obj, |
||
res | this | The res. |
obj | object | The obj. |
charset | The charset. | |
encoding | EncodingType | The encoding. |
return | IServerResponse |