I'm building a RESTful API client using C# .NET 3.5.
I first started building it with the good old HttpWebClient
(and HttpWebResponse
), I could do whatever I wanted with. I were happy. The only thing I stumbled upon was the automatic deserialization from JSON response.
So, I've heard about a wonderful library called RestSharp (104.1) which eases the development of RESTful API clients, and automatically deserialize JSON and XML responses. I switched all my code on it, but now I realize I can't do things I could do with HttpWebClient
and HttpWebResponse
, like access and edit the raw request body.
Anyone has a solution?
Edit: I know how to set the request body (with request.AddBody()
), my problem is that I want to get this request body string, edit it, and re-set it in the request (in other words: updating the request body on the fly)