Standard Parameters
Here is the exhaustive list of standard parameters, their direction (input / output), and what they are used for.
Output parameters are returned via a SELECT statement. Procedure arguments in output mode (OUTPUT) are not supported.
Request-related Parameters
Name | Direction | .NET Type | Format | SQL Server Type | Description |
---|---|---|---|---|---|
request_content_type | Input | string | MIME Type | VARCHAR(255) | The MIME type of the request body, extracted from the HTTP Content-Type header. |
request_body | Input | string | Raw | NVARCHAR(MAX) | The request body. |
request_form | Input | string | JSON | NVARCHAR(MAX) | A JSON that represents the form witch has been submitted by the user through a form content type. When it isn't null, request_body is null. |
request_headers | Input | string | JSON | NVARCHAR(MAX) | The request headers, as a key-value dictionary. |
request_cookies | Input | string | JSON | NVARCHAR(MAX) | The cookies attached to the request, as a key-value dictionary. |
request_path | Input | string | Raw | NVARCHAR(MAX) | The request path. |
query_params | Input | string | JSON | NVARCHAR(MAX) | The query parameters (present after the '?' in the URI), as a key-value dictionary. |
path_params | Input | string | JSON | NVARCHAR(MAX) | The parameters resolved from the route, as a key-value dictionary. |
request_model | Input | string | JSON | NVARCHAR(MAX) | The raw model managed by SQListe, containing all the information about the request. |
error | Input | string | JSON | NVARCHAR(MAX) | A model containing information about the last error that occurred. For more information, refer to TODO. |
response_model | Input | string | JSON | NVARCHAR(MAX) | The raw model managed by SQListe, containing all the information about the response in its current state. |
Response-related Parameters
These parameters can be returned from a procedure via a SELECT statement and will modify the state of the response.
Name | Direction | .NET Type | Format | SQL Server Type | Description |
---|---|---|---|---|---|
response_content_type | Input / Output | string | MIME Type | VARCHAR(255) | The MIME type of the response body, which will be assigned to the Content-Type HTTP header if not defined. |
response_body | Input / Output | string | Raw | NVARCHAR(MAX) | The response body. |
response_file | Input / Output | byte[] | Raw | VARBINARY(MAX) | The file that will be included in the response. |
response_file_name | Input / Output | string | Raw | NVARCHAR(MAX) | The name of the file that will be included in the response. |
response_file_inline | Input / Output | bool | BIT | True if the file should be in the browser's viewer. | |
response_headers | Input / Output | string | JSON | NVARCHAR(MAX) | The response headers, as a key-value dictionary. |
response_cookies | Input / Output | string | JSON | NVARCHAR(MAX) | The cookie attached to the response. For more information on the format, refer to the... TODO section. |
response_status | Input / Output | int | HTTP Status | INT | The response status code. |
These parameters can also be passed as procedure arguments. This allows retrieving the current state of the response, which can be useful after processing by middleware.
Storage-related Parameters
These parameters can be passed as procedure arguments and returned to modify the state.
Name | Direction | .NET Type | Format | SQL Server Type | Description |
---|---|---|---|---|---|
request_storage | Input / Output | string | JSON* | NVARCHAR(MAX) | Storage with a lifespan of a request. It is initialized with an empty JSON object at the beginning of a request ('{}'). |
session | Input / Output | string | JSON* | NVARCHAR(MAX) | Access to the HTTP session. For more information, refer to... TODO section. |
JSON* : Although the content is initially initialized with an empty JSON ('{}') by default, it can be safely changed as this content is not processed by SQListe.
Middleware-specific Parameters
These parameters can be passed as procedure arguments and returned to modify the state.
Name | Direction | .NET Type | Format | SQL Server Type | Description |
---|---|---|---|---|---|
next | Output | bool | BIT | If returned as 0, it interrupts the request pipeline. It defaults to 1. |