{"action":"created","issue":{"url":"https://api.github.com/repos/bitfinexcom/grenache-nodejs-http/issues/28","repository_url":"https://api.github.com/repos/bitfinexcom/grenache-nodejs-http","labels_url":"https://api.github.com/repos/bitfinexcom/grenache-nodejs-http/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/bitfinexcom/grenache-nodejs-http/issues/28/comments","events_url":"https://api.github.com/repos/bitfinexcom/grenache-nodejs-http/issues/28/events","html_url":"https://github.com/bitfinexcom/grenache-nodejs-http/pull/28","id":367866773,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMTc2NTgw","number":28,"title":"add streaming support","user":{"login":"robertkowalski","id":298166,"node_id":"MDQ6VXNlcjI5ODE2Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/298166?v=4","gravatar_id":"","url":"https://api.github.com/users/robertkowalski","html_url":"https://github.com/robertkowalski","followers_url":"https://api.github.com/users/robertkowalski/followers","following_url":"https://api.github.com/users/robertkowalski/following{/other_user}","gists_url":"https://api.github.com/users/robertkowalski/gists{/gist_id}","starred_url":"https://api.github.com/users/robertkowalski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertkowalski/subscriptions","organizations_url":"https://api.github.com/users/robertkowalski/orgs","repos_url":"https://api.github.com/users/robertkowalski/repos","events_url":"https://api.github.com/users/robertkowalski/events{/privacy}","received_events_url":"https://api.github.com/users/robertkowalski/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-08T16:31:16Z","updated_at":"2018-10-12T17:08:01Z","closed_at":"2018-10-12T17:07:54Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/bitfinexcom/grenache-nodejs-http/pulls/28","html_url":"https://github.com/bitfinexcom/grenache-nodejs-http/pull/28","diff_url":"https://github.com/bitfinexcom/grenache-nodejs-http/pull/28.diff","patch_url":"https://github.com/bitfinexcom/grenache-nodejs-http/pull/28.patch"},"body":"this adds streaming support for grenache.\r\n\r\nthe server emits a `stream` event before the request is\r\nparsed and buffered. with the setting `disableBuffered: true`\r\nwe can then disable the convenience auto-parsing and allow more\r\ngranular control on the serverside with the req and response\r\nobjects / streams. an object called `meta` is emitted, with\r\n`isStream (bool)`, indicating a streaming client. in case\r\nof a stream it also contains req-id and key, which are parsed\r\nfrom the http header, as the stream is reserved for the (binary)\r\ndata.\r\n\r\nwhen a stream is sent with the `strean` method, it\r\nwill add the grenache-specific req-id and key to the request\r\nheaders. if we want to send additional, grenache-specific data,\r\nthe arguments and actions, we can add those in our request:\r\n\r\n```js\r\nconst req = pst.stream('rpc_stream', {\r\n  timeout: 10000,\r\n  headers: {\r\n    _a: 'uploadPublic',\r\n    _ar: { foo: 'bar' }\r\n  }\r\n})\r\n```"},"comment":{"url":"https://api.github.com/repos/bitfinexcom/grenache-nodejs-http/issues/comments/429395025","html_url":"https://github.com/bitfinexcom/grenache-nodejs-http/pull/28#issuecomment-429395025","issue_url":"https://api.github.com/repos/bitfinexcom/grenache-nodejs-http/issues/28","id":429395025,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTM5NTAyNQ==","user":{"login":"prdn","id":3747053,"node_id":"MDQ6VXNlcjM3NDcwNTM=","avatar_url":"https://avatars1.githubusercontent.com/u/3747053?v=4","gravatar_id":"","url":"https://api.github.com/users/prdn","html_url":"https://github.com/prdn","followers_url":"https://api.github.com/users/prdn/followers","following_url":"https://api.github.com/users/prdn/following{/other_user}","gists_url":"https://api.github.com/users/prdn/gists{/gist_id}","starred_url":"https://api.github.com/users/prdn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prdn/subscriptions","organizations_url":"https://api.github.com/users/prdn/orgs","repos_url":"https://api.github.com/users/prdn/repos","events_url":"https://api.github.com/users/prdn/events{/privacy}","received_events_url":"https://api.github.com/users/prdn/received_events","type":"User","site_admin":false},"created_at":"2018-10-12T17:08:01Z","updated_at":"2018-10-12T17:08:01Z","author_association":"CONTRIBUTOR","body":"Beautiful!"}}
{"actor":{"display_login":"prdn"}}