7digital / SevenDigital.Api.Wrapper

A fluent c# wrapper for the 7digital API
MIT License
16 stars 29 forks source link

Response as #168

Closed AnthonySteele closed 10 years ago

AnthonySteele commented 10 years ago

Added ResponseAs method to the fluent api. It is like getting the raw Response(), but it is also deserialised into the specified DTO with the usual error checks and exceptions as per Please().

This method decouples the DTO used to find the endpoint from the DTO populated with the response data. In this case, if the response's Content-Type is json, the json deserialiser will be used instead of the xml one.

It will be useful in some customised scenarios and is a step towards full json support.