Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows10 Runtime Get Error #5

Closed
Bix3 opened this issue May 30, 2019 · 1 comment
Closed

Windows10 Runtime Get Error #5

Bix3 opened this issue May 30, 2019 · 1 comment

Comments

@Bix3
Copy link

Bix3 commented May 30, 2019

Hello, i noticed that when running this test code:

    http::Request request("http://test.com/test");
    // send a get request
    http::Response response = request.send("GET");
    std::cout << response.body.data() << std::endl; // print the result

It gets an error in HtppRequest.h line 401.
I fixed it with putting this code right before line 401:

      WSADATA wsaData;
      int error = WSAStartup(MAKEWORD(2, 2), &wsaData);
      if (error != 0)
        	throw std::system_error(error, std::system_category(), "WSAStartup failed");


now everything seems to work

@elnormous
Copy link
Owner

This is fixed in 0d731e4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants