{"action":"created","issue":{"url":"https://api.github.com/repos/paulcbetts/refit/issues/83","labels_url":"https://api.github.com/repos/paulcbetts/refit/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/paulcbetts/refit/issues/83/comments","events_url":"https://api.github.com/repos/paulcbetts/refit/issues/83/events","html_url":"https://github.com/paulcbetts/refit/pull/83","id":51162211,"number":83,"title":"Support for custom serializers","user":{"login":"bennor","id":1063280,"avatar_url":"https://avatars.githubusercontent.com/u/1063280?v=3","gravatar_id":"","url":"https://api.github.com/users/bennor","html_url":"https://github.com/bennor","followers_url":"https://api.github.com/users/bennor/followers","following_url":"https://api.github.com/users/bennor/following{/other_user}","gists_url":"https://api.github.com/users/bennor/gists{/gist_id}","starred_url":"https://api.github.com/users/bennor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bennor/subscriptions","organizations_url":"https://api.github.com/users/bennor/orgs","repos_url":"https://api.github.com/users/bennor/repos","events_url":"https://api.github.com/users/bennor/events{/privacy}","received_events_url":"https://api.github.com/users/bennor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-12-06T00:22:27Z","updated_at":"2015-11-04T22:41:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/paulcbetts/refit/pulls/83","html_url":"https://github.com/paulcbetts/refit/pull/83","diff_url":"https://github.com/paulcbetts/refit/pull/83.diff","patch_url":"https://github.com/paulcbetts/refit/pull/83.patch"},"body":"@paulcbetts This is just a first-pass at it so we can talk about the approach. \r\n\r\nI'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.\r\n\r\nKeen to see if this is like what you'd imagined us doing?\r\n\r\nOne thing I've done a bit differently to what you suggested was that I've made `ITypeSerializer.SerializeAsHttpContent()` synchronous. Making it async pushes a massive amount of changes through the codebase (mostly in tests, to be fair), but do we actually need to do it for serializing the _request_ body?\r\n\r\nAt least the following are still to do:\r\n\r\n- [ ] Make `ITypeSerializer.SerializeAsHttpContent()` async (maybe?)\r\n- [ ] Merge in #80 or add `RefitSettings` to `RestMethodInfo` and deal with the conflicts later.\r\n- [ ] Add a basic XML serializer as a reference\r\n- [ ] Write tests\r\n\r\nThis will resolve #75."},"comment":{"url":"https://api.github.com/repos/paulcbetts/refit/issues/comments/153892860","html_url":"https://github.com/paulcbetts/refit/pull/83#issuecomment-153892860","issue_url":"https://api.github.com/repos/paulcbetts/refit/issues/83","id":153892860,"user":{"login":"bennor","id":1063280,"avatar_url":"https://avatars.githubusercontent.com/u/1063280?v=3","gravatar_id":"","url":"https://api.github.com/users/bennor","html_url":"https://github.com/bennor","followers_url":"https://api.github.com/users/bennor/followers","following_url":"https://api.github.com/users/bennor/following{/other_user}","gists_url":"https://api.github.com/users/bennor/gists{/gist_id}","starred_url":"https://api.github.com/users/bennor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bennor/subscriptions","organizations_url":"https://api.github.com/users/bennor/orgs","repos_url":"https://api.github.com/users/bennor/repos","events_url":"https://api.github.com/users/bennor/events{/privacy}","received_events_url":"https://api.github.com/users/bennor/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T22:41:42Z","updated_at":"2015-11-04T22:41:42Z","body":"This PR is almost a year old. It will probably need a lot of work before we can use it. Might even be worth throwing out and starting again. Unfortunately, I don't have the time for that at the moment.\r\n\r\nWould be amazing if one of you wanted to pick it up."}}