I am trying to download a file from azure devops server using API.API give a success response.But no files getting downloaded.If we remove format parameter, we will get response with file link.by clicking that file is not getting downloaded.
sample code
var personalaccesstoken = "ic2pqkzaeqv2dummyTokenDummypa";
client1.BaseAddress = new Uri("https://dev.azure.com/organisatioTest/ProjectABC");
client1.DefaultRequestHeaders.Accept.Clear();
client1.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client1.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic",
Convert.ToBase64String(
System.Text.ASCIIEncoding.ASCII.GetBytes(
string.Format("{0}:{1}", "", personalaccesstoken))));
HttpResponseMessage response1 = client1.GetAsync("_apis/git/repositories/e9e2f082-6f6d-99999b0bcc737a/items?scopePath=/Vjjj/DB/Data/ABC.sql&download=true&$format=zip&api-version=5.1").Result;
Should we add additional c# code to get file download ? How can we specify the download path ?