1
votes

I have a REST web service which produces media of type MULTIPART_FORM_DATA as response and JSON in the the response header. What is the easiest way to read this response header (JSON) using RestSharp REST API client?

Is there a similar way to do this using RestClient like following in .NET 4?

response.Headers.GetKey(i);
response.Headers.Get(i).ToString()

(Reference: first answer of this question)

1

1 Answers

1
votes

Figured out a way to do it and it's working fine.

response.Headers.ElementAt(i).Name.ToString();    
response.Headers.ElementAt(i).Value.ToString();