paulcbetts/refit — pull request #83 by bennor (2014-12-06 00:22:27+00:00)
Title: Support for custom serializers

@paulcbetts This is just a first-pass at it so we can talk about the approach.

I've added `BodySerializationMethod.Custom`, because it saved having to change the signature of `RestMethodInfo.BodyParameterInfo` (and it makes a few things easier later), but it's not _required_ -- `RestMethodInfo.findBodyParameter()` treats any parameter with a type in `RefitSettings.CustomSerializers` as a body parameter.

Keen to see if this is like what you'd imagined us doing?

At least the following are still to do:

- [ ] Make `ITypeSerializer.SerializeAsHttpContent()` async
- [ ] Merge in #80 or add `RefitSettings` to `RestMethodInfo` and deal with the conflicts later.
- [ ] Add a basic XML serializer as a reference
- [ ] Write tests