I am trying to hit smartfile api, this api is working fine using postman, but when i add query string parameter to url it gives me error.
I need below url to be created when request send to smartfile
but when my code executes It appends slash at the end of info and give me error of forbidden link. this error is only coming due to url. below url is generating from code
string urlParameters = "?children=true";
HttpClient client = new HttpClient();
client.BaseAddress = new Uri("https://app.smartfile.com/api/2/path/info");
//Authorization added somewhere in the code,
// Add an Accept header for JSON format.
client.DefaultRequestHeaders.Accept.Add(
new MediaTypeWithQualityHeaderValue("application/json"));
// List data response.
HttpResponseMessage response = client.GetAsync(urlParameters).Result;
Rajanikant HawaldarPosted Nov 7, 2019, 11:39 PM