Property | Type | Description | |
---|---|---|---|
HttpResponse | System |
Method | Description | |
---|---|---|
AddHeader ( string name, string value ) : void |
Add another header to the document. Adding any header will override the default ones and those specified by properties. |
|
HttpResponse ( IHttpClientContext context, IHttpRequest request ) : System |
Initializes a new instance of the IHttpResponse class.
|
|
Redirect ( |
Redirect client to somewhere else using the 302 status code. You can not do anything more with the request when a redirect have been done. This should be your last action. |
|
Redirect ( string url ) : void |
redirect to somewhere No body are allowed when doing redirects. |
|
Send ( ) : void |
Send headers and body to the browser.
|
|
SendBody ( byte buffer ) : void |
Make sure that you have specified ContentLength and sent the headers first. This method can be used if you want to send body contents without caching them first. This is recommended for larger files to keep the memory usage low. |
|
SendBody ( byte buffer, int offset, int count ) : void |
Make sure that you have specified ContentLength and sent the headers first. This method can be used if you want to send body contents without caching them first. This is recommended for larger files to keep the memory usage low. |
|
SendHeaders ( ) : void |
Send headers to the client.
|
Method | Description | |
---|---|---|
HttpResponse ( IHttpClientContext context, string httpVersion, ConnectionType connectionType ) : System |
Initializes a new instance of the IHttpResponse class.
|
public AddHeader ( string name, string value ) : void | ||
name | string | Name of the header, case sensitive, use lower cases. |
value | string | Header values can span over multiple lines as long as each line starts with a white space. New line chars should be \r\n |
return | void |
public HttpResponse ( IHttpClientContext context, IHttpRequest request ) : System | ||
context | IHttpClientContext | Client that send the |
request | IHttpRequest | Contains information of what the client want to receive. |
return | System |
public Redirect ( |
||
uri | Destination of the redirect | |
return | void |
public Redirect ( string url ) : void | ||
url | string | where the redirect should go |
return | void |
public SendBody ( byte buffer, int offset, int count ) : void | ||
buffer | byte | |
offset | int | offest of first byte to send |
count | int | number of bytes to send. |
return | void |