microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
8.01k stars 1.66k forks source link

web::uri and http_listener error #1604

Open jpchern opened 3 years ago

jpchern commented 3 years ago

cpprestsdk 2.10 VS2019

using namespace web; using namespace web::http; using namespace web::http::experimental::listener;

web::uri _uri(L"http://127.0.0.1:8080"); //OK http_listener listener(_uri); //Failed at memcpy()

It seems that _uri was generated OK but destroyed immediately before calling http_listener listener(_uri);

Any thoughts would be appreciated.