|
HttpServerBoxed 0.0.11 alpha
A simple http server for C# and .NET
|
Public Member Functions | |
| Request (byte[] data, Socket socket, Configuration config, bool isTLS=false) | |
| Session | GetSession () |
| Return the session associated with the request. | |
| Tuple< string, string >? | GetBasicAuthInformation () |
| OAuth1_0Information? | GetOAuth1_0Information () |
| bool | IsJSON () |
| Test if a request contains a JSON document in the body. | |
| bool | IsWebSocket () |
| Returns true if the request is a websocket request. | |
| bool | IsFileUpload () |
| Returns true if the request is a file upload. | |
| bool | IsFormUpload () |
| Returns true if the request is a form upload. | |
| MultiPartFormData? | GetMultiPartFormData () |
| Returns the form data if the request is a multipart formdata upload, else null. | |
| Form? | GetFormData () |
| Returns the form data if the request is a form upload, else null. | |
| Socket | GetSocket () |
| void | DumpRequest (string path="./request.txt") |
| void | DumpBody (string path="./body.txt") |
| void | FullPrint () |
| override string | ToString () |
Public Attributes | |
| bool | validRequest = false |
| readonly bool | IsTLS = false |
| bool | IsValidRequest = true |
Properties | |
| HTTP_METHOD | METHOD [get] |
| Return the method of the request. | |
| HTTP_PROTOCOL | PROTOCOL [get] |
| Return the protocol of the request. | |
| string | URL [get] |
| Return the url of the request. | |
| string | ClientIP [get] |
| Return the ip of the client (request source ip) | |
| int | ClientPort [get] |
| Return the port of the client (request source port) | |
| AddressFamily | ClientIPVersion [get] |
| Return the ip version of the client (request source ip version (v4 or v6)) | |
| byte[] | RawBody [get] |
| Return the raw body of the request. | |
| string | Body [get] |
| Return the body of the request parsed as string. | |
| Dictionary< string, string > | Headers [get] |
| Return the headers. | |
| List< string > | RawHeaders [get] |
| Return the unparsed headers. | |
| Dictionary< string, string > | Parameters [get] |
| Return the parameters. | |
| bool | IsAjaxRequest [get] |
| Returns if the request is an ajax request. | |
| string | GetRawRequestText [get] |
Definition at line 10 of file Request.cs.
| HSB.Request.Request | ( | byte[] | data, |
| Socket | socket, | ||
| Configuration | config, | ||
| bool | isTLS = false |
||
| ) |
Definition at line 45 of file Request.cs.
| void HSB.Request.DumpBody | ( | string | path = "./body.txt" | ) |
Definition at line 354 of file Request.cs.
| void HSB.Request.DumpRequest | ( | string | path = "./request.txt" | ) |
Definition at line 350 of file Request.cs.
| void HSB.Request.FullPrint | ( | ) |
Definition at line 362 of file Request.cs.
| Form? HSB.Request.GetFormData | ( | ) |
Returns the form data if the request is a form upload, else null.
| MultiPartFormData? HSB.Request.GetMultiPartFormData | ( | ) |
Returns the form data if the request is a multipart formdata upload, else null.
| Session HSB.Request.GetSession | ( | ) |
Return the session associated with the request.
| bool HSB.Request.IsFileUpload | ( | ) |
Returns true if the request is a file upload.
| bool HSB.Request.IsFormUpload | ( | ) |
Returns true if the request is a form upload.
| bool HSB.Request.IsJSON | ( | ) |
Test if a request contains a JSON document in the body.
| bool HSB.Request.IsWebSocket | ( | ) |
Returns true if the request is a websocket request.
Definition at line 318 of file Request.cs.
| override string HSB.Request.ToString | ( | ) |
Definition at line 385 of file Request.cs.
| readonly bool HSB.Request.IsTLS = false |
Definition at line 34 of file Request.cs.
| bool HSB.Request.IsValidRequest = true |
Definition at line 44 of file Request.cs.
| bool HSB.Request.validRequest = false |
Definition at line 22 of file Request.cs.
|
get |
Return the body of the request parsed as string.
Definition at line 283 of file Request.cs.
|
get |
Return the ip of the client (request source ip)
Definition at line 267 of file Request.cs.
|
get |
Return the ip version of the client (request source ip version (v4 or v6))
Definition at line 275 of file Request.cs.
|
get |
Return the port of the client (request source port)
Definition at line 271 of file Request.cs.
|
get |
Definition at line 349 of file Request.cs.
|
get |
Return the headers.
Definition at line 287 of file Request.cs.
|
get |
Returns if the request is an ajax request.
Definition at line 313 of file Request.cs.
|
get |
Return the method of the request.
Definition at line 255 of file Request.cs.
|
get |
Return the parameters.
Definition at line 295 of file Request.cs.
|
get |
Return the protocol of the request.
Definition at line 259 of file Request.cs.
|
get |
Return the raw body of the request.
Definition at line 279 of file Request.cs.
|
get |
Return the unparsed headers.
Definition at line 291 of file Request.cs.
|
get |
Return the url of the request.
Definition at line 263 of file Request.cs.