0

I need to print the value of contentType variable.

void WsListener::handle_put(http_request message)
{

    http_headers& headers = message.headers();
    utility::string_t contentType=headers.content_type();
    cout << (string)contentType;
};

Error output

Severity    Code    Description Project File    Line    Suppression State
Error   C2440   'type cast': cannot convert from 'utility::string_t' to 'std::string'   StolenDetailsService    c:\users\nuwanst\source\repos\stolendetailsservice\stolendetailsservice\wslistner.cpp   65  
Error (active)  E0312   no suitable user-defined conversion from "utility::string_t" to "std::string" exists    StolenDetailsService    c:\Users\Nuwanst\source\repos\StolenDetailsService\StolenDetailsService\wsListner.cpp   65  
Nwn
  • 561
  • 2
  • 9
  • 33

0 Answers0