]> git.proxmox.com Git - ceph.git/blob - ceph/src/civetweb/docs/api/mg_response_info.md
buildsys: switch source download to quincy
[ceph.git] / ceph / src / civetweb / docs / api / mg_response_info.md
1 # Civetweb API Reference
2
3 ### `struct mg_response_info;`
4
5 ### Fields
6
7 struct mg_response_info {
8 int status_code; /* E.g. 200 */
9 const char *status_text; /* E.g. "OK" */
10 const char *http_version; /* E.g. "1.0", "1.1" */
11
12 long long content_length; /* Length (in bytes) of the request body,
13 can be -1 if no length was given. */
14
15 int num_headers; /* Number of HTTP headers */
16 struct mg_header
17 http_headers[MG_MAX_HEADERS]; /* Allocate maximum headers */
18 };
19
20 | Field | Type | Description |
21 | :--- | :--- | :--- |
22 |**`status code`**|`int`| The HTTP response code received by the client. |
23 |**`status_text`**|`const char *`| The textual representation of the HTTP status code. |
24 |**`http_version`**|`const char *`| The HTTP version as mentioned in the client request. This can be "1.0", "1.1", etc. |
25 |**`content_length`**|`long long`| The content length of the request body. This value can be -1 if no content length was provided. The request may still have body data, but the server cannot determine the length until all data has arrived (e.g. when the client closes the connection, or the final chunk of a chunked request has been received). |
26 |**`num_headers`**|`int`| The number of HTTP request headers sent by the client (see http_headers) |
27 |**`http_headers`**|`struct mg_header[64]`| Array of structures with the HTTP request headers sent by the client. For the number of filled header fields, ee num_headers. |
28
29 Note: This structure is not yet feature complete and will be extended in future versions.
30
31 ### Description
32
33 The `mg_response_info` structure contains information on a completed request from a client.
34
35 ### See Also
36
37 * [`struct mg_header;`](mg_header.md)
38 * [`mg_get_response_info();`](mg_get_response_info.md)