You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -560,7 +560,6 @@ The `http_request` class has a set of methods you will have access to when imple
560
560
*_**const std::map<std::string, std::string, http::header_comparator>** get_cookies() **const**:_ Returns a map containing all the cookies present in the HTTP request.
561
561
*_**const std::map<std::string, std::string, http::header_comparator>** get_footers() **const**:_ Returns a map containing all the footers present in the HTTP request (only for http 1.1 chunked encodings).
562
562
*_**const std::map<std::string, std::string, http::arg_comparator>** get_args() **const**:_ Returns all the arguments present in the HTTP request. Arguments can be (1) querystring parameters, (2) path argument (in case of parametric endpoint, (3) parameters parsed from the HTTP request body if the body is in `application/x-www-form-urlencoded` or `multipart/form-data` formats and the postprocessor is enabled in the webserver (enabled by default).
563
-
*_**const std::map<std::string, file_info_s>** get_files() **const**:_ Returns information about all the uploaded files (if the files are stored to disk). This information includes the original file name, the size of the file and the path to the file in the file system.
564
563
*_**const std::map<std::string, std::map<std::string, http::file_info>>** get_files() **const**:_ Returns information about all the uploaded files (if the files are stored to disk). This information includes the key (as identifier of the outer map), the original file name (as identifier of the inner map) and a class `file_info`, which includes the size of the file and the path to the file in the file system.
565
564
*_**const std::string&** get_content() **const**:_ Returns the body of the HTTP request.
566
565
*_**bool** content_too_large() **const**:_ Returns `true` if the body length of the HTTP request sent by the client is longer than the max allowed on the server.
@@ -575,6 +574,13 @@ The `http_request` class has a set of methods you will have access to when imple
575
574
*_**gnutls_session_t** get_tls_session() **const**:_ Tests if there is am underlying TLS state of the current request.
576
575
*_**gnutls_session_t** get_tls_session() **const**:_ Returns the underlying TLS state of the current request for inspection. (It is an error to call this if the state does not exist.)
577
576
577
+
Details on the `http::file_info` structure.
578
+
579
+
*_**size_t** get_file_size() **const**:_ Returns the size of the file uploaded through the HTTP request.
580
+
*_**const std::string** get_file_system_file_name() **const**:_ Returns the name of the file uploaded through the HTTP request as stored on the filesystem.
581
+
*_**const std::string** get_content_type() **const**:_ Returns the content type of the file uploaded through the HTTP request.
582
+
*_**const std::string** get_transfer_encoding() **const**:_ Returns the transfer encoding of the file uploaded through the HTTP request.
583
+
578
584
#### Example of handler reading arguments from a request
0 commit comments