passing JSON in httpclient request method does not work.

Jul 15, 2015 at 6:33 AM

I am trying to pass a json value with GET request to listener from client and using following API :
"pplx::task<http_response> web::http::client::http_client::request ( const method & mtd,
const utility::string_t & path_query_fragment,
const json::value & body_data,
const pplx::cancellation_token & token = pplx::cancellation_token::none()

code snippet :
json::value command;
command[L"cmd"] = json::value::string(U("helo"));
command[L"param"] = json::value::string(U("2"));

auto query = uri_builder().append_query(L"q","search") .to_string();

client.request(methods::GET, query, command).then([=](http_response res){
ucout << res.extract_json().get();

request doesnt get processed.
could you please point out whats wrong?
Jul 15, 2015 at 6:54 PM
Hi pooja_codeplex,

I'm a little confused, what exactly do you mean the request doesn't get processed? What is the HTTP response you are receiving on the http_client side? Are you getting an exception?

What platform are you running on? I'm guessing Windows since I see 'L' in use. If you are on Windows and making the HTTP client request from a different machine than our http_listener you will need to run your http_listener with administrative privileges in order to be able to receive and process any requests. More details can be found here in this discussion.