Stiffstream / restinio

Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.15k stars 93 forks source link

There should be to_string_view for restinio::http_field_parsers::basic_auth::extraction_error_t #107

Closed eao197 closed 4 years ago

eao197 commented 4 years ago

It is necessary for the simplification of the logging of auth-params extraction failures. For example:

auto basic_auth_result = restinio::http_field_parsers::basic_auth::try_extract_params(field_value);
if(!basic_auth_result)
   logger->warn("unable to extract basic-auth params: {}", to_string_view(basic_auth_result.error()));
...