I have current code that is making POST request to REST API:
string url = "https://xxxx.azurewebsites.net/api/walk/";
string sContentType = "application/json";
JObject jsonObject = new JObject();
jsonObject.Add("Duration", walkInfo.Duration);
jsonObject.Add("WalkDate", walkInfo.WalkDate);
HttpClient oHttpClient = new HttpClient();
var oTaskPostAsync = oHttpClient.PostAsync(url, new StringContent(jsonObject.ToString(), Encoding.UTF8, sContentType));
And it works nice, what I have problems with is that I can't figure out how to get Location header from response of API. When I do test requires via postman I can see that location header is set Location →http://xxx/api/walk/5 so I need to get this Location value after PostAsync is executed.