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::bearer_auth::extraction_error_t #108

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 bearer_auth_result = restinio::http_field_parsers::bearer_auth::try_extract_params(field_value);
if(!bearer_auth_result)
   logger->warn("unable to extract bearer-auth params: {}", to_string_view(bearer_auth_result.error()));
...