Another breaking change an 1.0 release update
Breaking Change
RestRequest.ResponseFormat has been removed because it was too naive. If your requests return XML and specify an XML content type, the XML deserializer will be used and likewise for JSON. If you want to override those deserializers or need to handle a different content type, use the following methods:
var client = new RestClient();
// clear default handlers
client.ClearHandlers();
// add custom handler
// second parameter is instance of IDeserializer
client.AddHandler("application/json", new FunkyDeserializer());
By default the following content types are handled:
- application/xml
- application/json
- text/xml
- text/json (please don’t use this in your apps, supporting it because it’s out there)
By default if the content type returned by your request doesn’t match one of those content types the XML deserializer is used. To register a default handler use client.AddHandler("*", …); You can also remove specific handlers using client.RemoveHandler(contentType);
1.0 Release Update
I know I promised February 24 but a couple bugs and some good feedback items came in and I wanted to resolve them by 1.0. Now I’m going to be on vacation and at MIX so it will likely be shortly after that. Follow @RestSharp for updates.
