This is more of error checking than anything else. I inadvertently used methods::GET with body_data. I really wanted to use methods::POST.
test:
```
//
//this one will generate exception
//
http_client client(U("http://localhost"));
client.request(methods::GET, U("/"), U("blah=data")).then([=](http_response response)
{
wcout<<response.to_string();
}).wait();
//
//this one will work
//
http_client client(U("http://localhost"));
client.request(methods::POST, U("/"), U("blah=data")).then([=](http_response response)
{
wcout<<response.to_string();
}).wait();
```
Comments: Is it also by design that if http_client client(<uri>) doesn't contains the resource prefix it would crash? ``` //exception http_client client(U("localhost")) client.request()//exception //works http_client client(U("http://localhost")) client.request()//exception ``` I think maybe it's better to differentiate between wrong input and fatal errors like memory corruption.
test:
```
//
//this one will generate exception
//
http_client client(U("http://localhost"));
client.request(methods::GET, U("/"), U("blah=data")).then([=](http_response response)
{
wcout<<response.to_string();
}).wait();
//
//this one will work
//
http_client client(U("http://localhost"));
client.request(methods::POST, U("/"), U("blah=data")).then([=](http_response response)
{
wcout<<response.to_string();
}).wait();
```
Comments: Is it also by design that if http_client client(<uri>) doesn't contains the resource prefix it would crash? ``` //exception http_client client(U("localhost")) client.request()//exception //works http_client client(U("http://localhost")) client.request()//exception ``` I think maybe it's better to differentiate between wrong input and fatal errors like memory corruption.