Hi Steve,
Last question i hope......with the code below, I connect to a server and upload the data I want. However upon running the program for the first time it gives me a "debug error R6010" then when I close it and do nothing but run it again, it works with no issues. Could you help me out with troubleshooting this because my end application is an automation with no option for the user to re run the program if it fails on the first run. Code is:
int _tmain(int argc, _TCHAR* argv[])
{
Thanks again.
Steven
Last question i hope......with the code below, I connect to a server and upload the data I want. However upon running the program for the first time it gives me a "debug error R6010" then when I close it and do nothing but run it again, it works with no issues. Could you help me out with troubleshooting this because my end application is an automation with no option for the user to re run the program if it fails on the first run. Code is:
int _tmain(int argc, _TCHAR* argv[])
{
auto stream = concurrency::streams::file_buffer<uint8_t>::open(U("content being uploaded"), std::ios_base::in).get();
http_client client (U("my server addy"));
http_response response = client.request(methods::POST, U("path"), stream, U("string")).get();
if(response.status_code() == status_codes::OK)
{
cout<<"Connection to Server Sucessful"<<endl;
const utility::string_t body = response.extract_string().get();
std::wcout<<body;
}
else
{
cout<<"Connection to Server UNSUCCESSFUL"<<endl;
}
//getchar();
return 0;
}Thanks again.
Steven