Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: Get metadata

$
0
0
  Thank you for the prompt reply steve, I found that HEAD is the method i was looking for and written a code snippet too.
   Following is my code which works fine when i set the method to POST

    http_client *client = new http_client(L"https://os-keystone01.servosity.com.lab:5000/v2.0/tokens");
    request1.set_method(methods::HEAD);
request1.headers().add(L"Content-type", L"application/json");
request1.set_body(authData);
auto responseTask1 = client->request(request1);
http_response response1;
response1 = responseTask1.get();
std::wcout<<response1.to_string()<<std::endl;
but i cannot figure out why the same code is not working with HEAD?
Can you suggest any corrections in it.

Akshat

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>