HttpRequestHandler
Request handler for HTTP GET and POST requests
Inherits: Thread
Operations
GetHeaders
Get HTTP headers
method : public : GetHeaders() ~ Map<String,String>Return
| Type | Description |
|---|---|
| Map<String,String> | HTTP headers |
ProcessGet
Callback for GET requests
method : private : virtual : ProcessGet(request:Web.HTTP.Server.Request, response:Web.HTTP.Server.Response) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| request | Request | HTTP request |
| response | Response | HTTP response |
Return
| Type | Description |
|---|---|
| Bool | true to continue processing, false otherwise |
ProcessPost
Callback for POST requests
method : private : virtual : ProcessPost(request:Web.HTTP.Server.Request, response:Web.HTTP.Server.Response) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| request | Request | HTTP request |
| response | Response | HTTP response |
Return
| Type | Description |
|---|---|
| Bool | true to continue processing, false otherwise |
ProcessResponse
Processes the HTTP response
method : private : ProcessResponse(response:Response, is_head:Bool) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| response | Response | HTTP response |
| is_head | Bool | true if HEAD request, false otherwise |
Run
Executes the request handler thread
method : public : Run(param:Base) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| param | Base | thread parameter containing client socket |
SetConfig
Sets the server configuration
method : public : SetConfig(server_config:WebServerConfig, is_debug:Bool) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| server_config | WebServerConfig | web server configuration |
| is_debug | Bool | true for debug output, false otherwise |