{"action":"created","issue":{"url":"https://api.github.com/repos/whatwg/fetch/issues/34","labels_url":"https://api.github.com/repos/whatwg/fetch/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/fetch/issues/34/comments","events_url":"https://api.github.com/repos/whatwg/fetch/issues/34/events","html_url":"https://github.com/whatwg/fetch/issues/34","id":65853675,"number":34,"title":"Access to the HTTP trailer","user":{"login":"tyoshino","id":4511440,"avatar_url":"https://avatars.githubusercontent.com/u/4511440?v=3","gravatar_id":"","url":"https://api.github.com/users/tyoshino","html_url":"https://github.com/tyoshino","followers_url":"https://api.github.com/users/tyoshino/followers","following_url":"https://api.github.com/users/tyoshino/following{/other_user}","gists_url":"https://api.github.com/users/tyoshino/gists{/gist_id}","starred_url":"https://api.github.com/users/tyoshino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyoshino/subscriptions","organizations_url":"https://api.github.com/users/tyoshino/orgs","repos_url":"https://api.github.com/users/tyoshino/repos","events_url":"https://api.github.com/users/tyoshino/events{/privacy}","received_events_url":"https://api.github.com/users/tyoshino/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":52,"created_at":"2015-04-02T06:34:33Z","updated_at":"2015-07-21T16:26:56Z","closed_at":null,"body":"The trailer semantics in RFC 7230 (and also since 2616) provides an ability to send/receive a meta-data out of and after the body part.\r\n\r\nHTTP2 also supports it though the chunked TE has been deprecated.\r\n\r\ngRPC (https://github.com/grpc/grpc) utilizes it and other applications may also benefit from it.\r\n\r\nFor XHR2, there was some discussion about trailer support in 2010: https://lists.w3.org/Archives/Public/public-webapps/2010OctDec/thread.html#msg163. @mnot well described that together with observation such as increasing use of the trailers.\r\n\r\nAnne declined it at that time https://lists.w3.org/Archives/Public/public-webapps/2010OctDec/0233.html. But maybe it's good to revisit this needs in the context of the Fetch API standardization. Introduction of interfaces to access the trailer may affect streams integration design. So, we should start thinking how it would be like asap if we support it.\r\n\r\n```idl\r\ndictionary RequestInit {\r\n  ...\r\n  Promise<HeadersInit> trailer;\r\n  ...\r\n};\r\n\r\ninterface Request {\r\n  ...\r\n  readonly attribute Promise<Headers> trailer;\r\n  ...\r\n};\r\n\r\ndictionary ResponseInit {\r\n  ...\r\n  Promise<HeadersInit> trailer;\r\n  ...\r\n};\r\n\r\ninterface Response {\r\n  ...\r\n  readonly attribute Promise<Headers> trailer;\r\n  ...\r\n};\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/whatwg/fetch/issues/comments/123392847","html_url":"https://github.com/whatwg/fetch/issues/34#issuecomment-123392847","issue_url":"https://api.github.com/repos/whatwg/fetch/issues/34","id":123392847,"user":{"login":"mcmanus","id":260531,"avatar_url":"https://avatars.githubusercontent.com/u/260531?v=3","gravatar_id":"","url":"https://api.github.com/users/mcmanus","html_url":"https://github.com/mcmanus","followers_url":"https://api.github.com/users/mcmanus/followers","following_url":"https://api.github.com/users/mcmanus/following{/other_user}","gists_url":"https://api.github.com/users/mcmanus/gists{/gist_id}","starred_url":"https://api.github.com/users/mcmanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcmanus/subscriptions","organizations_url":"https://api.github.com/users/mcmanus/orgs","repos_url":"https://api.github.com/users/mcmanus/repos","events_url":"https://api.github.com/users/mcmanus/events{/privacy}","received_events_url":"https://api.github.com/users/mcmanus/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T16:26:56Z","updated_at":"2015-07-21T16:26:56Z","body":"@igrigorik \r\n\r\n>    Client request: {id: 5, path: /thing}\r\n >  Server issues PUSH_PROMISE: {id: 6, path: /.well-known/trailers, body: some-json-thing}\r\n\r\nnot quite.. server issues\r\n PUSH_PROMISE: {id: 5, promise id 6, path: /.well-known/trailers, body: some-json-thing}\r\n\r\npushes promises are part of an open(ish) peer initiated stream\r\n"}}