as the error is the server you are calling, you will need to debug that code. showing us the calling code does not help. most likely the payload does not have valid values, but we have no idea what a valid payload is.
Need to update Test case status at run time using C#.
Mayank A
20
Reputation points
Issue is:- I am able to connect with BaseURL with credentials in NetworkCredentials.But Response getting 404 System.ObjectDisposedException : Cannot access a disposed object.
Below is set code used:-
using (HttpClientHandler handler = new HttpClientHandler()){
handler.Credentials = new NetworkCredential("xx", "xx", "xx");
using (HttpClient client = new HttpClient(handler)){
client.BaseAddress = new Uri(baseUrl);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
string payload = $"[{{\"id\": \"162789\", \"outcome\": \"Passed\", \"state\": \"Completed\"}}]";
string requestUrl = baseUrl + "_testExecution/Index";
HttpResponseMessage response = await client.PatchAsync(requestUrl, new StringContent(payload, Encoding.UTF8, "application/json"));