{"action":"opened","issue":{"url":"https://api.github.com/repos/vinniefalco/Beast/issues/178","repository_url":"https://api.github.com/repos/vinniefalco/Beast","labels_url":"https://api.github.com/repos/vinniefalco/Beast/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/vinniefalco/Beast/issues/178/comments","events_url":"https://api.github.com/repos/vinniefalco/Beast/issues/178/events","html_url":"https://github.com/vinniefalco/Beast/issues/178","id":188314823,"number":178,"title":"refactor Writer concept","user":{"login":"vinniefalco","id":1503976,"avatar_url":"https://avatars.githubusercontent.com/u/1503976?v=3","gravatar_id":"","url":"https://api.github.com/users/vinniefalco","html_url":"https://github.com/vinniefalco","followers_url":"https://api.github.com/users/vinniefalco/followers","following_url":"https://api.github.com/users/vinniefalco/following{/other_user}","gists_url":"https://api.github.com/users/vinniefalco/gists{/gist_id}","starred_url":"https://api.github.com/users/vinniefalco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinniefalco/subscriptions","organizations_url":"https://api.github.com/users/vinniefalco/orgs","repos_url":"https://api.github.com/users/vinniefalco/repos","events_url":"https://api.github.com/users/vinniefalco/events{/privacy}","received_events_url":"https://api.github.com/users/vinniefalco/received_events","type":"User","site_admin":false},"labels":[{"id":452918760,"url":"https://api.github.com/repos/vinniefalco/Beast/labels/API%20Change","name":"API Change","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-09T18:12:47Z","updated_at":"2016-11-09T18:12:47Z","closed_at":null,"body":"The **Writer** concept has some issues with it. One is that in order for `prepare` to insert the content length, it has to construct the Writer twice. Another is the complexity of the **write_function** and **resume_context**. I am considering these changes to the **Writer** concept:\r\n\r\n* Beast will only serialize message bodies whose size is known in advance\r\n* Remove nested type `Body::writer`\r\n* `chunk_encode` is now a public interface so callers can perform chunk encoding themselves if necessary\r\n* The **Body** concept will have this requirement for writing:\r\n```\r\n    struct Body\r\n    {\r\n        ...\r\n        template<class WriteFunction>\r\n        static\r\n        void\r\n        write(WriteFunction const& wf, value_type const& body);\r\n    };\r\n```\r\n"}}
{"actor":{"display_login":"vinniefalco"}}