{"action":"created","issue":{"url":"https://api.github.com/repos/yhirose/cpp-httplib/issues/106","repository_url":"https://api.github.com/repos/yhirose/cpp-httplib","labels_url":"https://api.github.com/repos/yhirose/cpp-httplib/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/yhirose/cpp-httplib/issues/106/comments","events_url":"https://api.github.com/repos/yhirose/cpp-httplib/issues/106/events","html_url":"https://github.com/yhirose/cpp-httplib/issues/106","id":381360583,"node_id":"MDU6SXNzdWUzODEzNjA1ODM=","number":106,"title":"Asynchronoush server push","user":{"login":"danesh-d","id":6954936,"node_id":"MDQ6VXNlcjY5NTQ5MzY=","avatar_url":"https://avatars2.githubusercontent.com/u/6954936?v=4","gravatar_id":"","url":"https://api.github.com/users/danesh-d","html_url":"https://github.com/danesh-d","followers_url":"https://api.github.com/users/danesh-d/followers","following_url":"https://api.github.com/users/danesh-d/following{/other_user}","gists_url":"https://api.github.com/users/danesh-d/gists{/gist_id}","starred_url":"https://api.github.com/users/danesh-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danesh-d/subscriptions","organizations_url":"https://api.github.com/users/danesh-d/orgs","repos_url":"https://api.github.com/users/danesh-d/repos","events_url":"https://api.github.com/users/danesh-d/events{/privacy}","received_events_url":"https://api.github.com/users/danesh-d/received_events","type":"User","site_admin":false},"labels":[{"id":14577331,"node_id":"MDU6TGFiZWwxNDU3NzMzMQ==","url":"https://api.github.com/repos/yhirose/cpp-httplib/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-15T22:09:05Z","updated_at":"2018-11-23T02:09:03Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nThis is rather question/feature request to whether the library supports this feature or not. I would like to know whether it is possible to push asynchronous data to the client from a HTTP server implemented using cpp-httplib? Of course by push I do not mean the push that is defined in HTTP/2 which is about pushing resources to the client in advance, but I mean pushing notification/data to the client when the client has not sent any request to the server.\r\n\r\nA quick and naive solution in my mind would be to implement a tiny HTTP server at the client side as well, so the server can send data asynchronously using another library like curl through a PUT method to the client but I am not sure if this is an efficient solution since both server and client should have limited implementations of both server and client embedded.\r\n\r\nRegards,\r\n\r\nDanesh\r\n"},"comment":{"url":"https://api.github.com/repos/yhirose/cpp-httplib/issues/comments/441143706","html_url":"https://github.com/yhirose/cpp-httplib/issues/106#issuecomment-441143706","issue_url":"https://api.github.com/repos/yhirose/cpp-httplib/issues/106","id":441143706,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTE0MzcwNg==","user":{"login":"yhirose","id":357397,"node_id":"MDQ6VXNlcjM1NzM5Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/357397?v=4","gravatar_id":"","url":"https://api.github.com/users/yhirose","html_url":"https://github.com/yhirose","followers_url":"https://api.github.com/users/yhirose/followers","following_url":"https://api.github.com/users/yhirose/following{/other_user}","gists_url":"https://api.github.com/users/yhirose/gists{/gist_id}","starred_url":"https://api.github.com/users/yhirose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yhirose/subscriptions","organizations_url":"https://api.github.com/users/yhirose/orgs","repos_url":"https://api.github.com/users/yhirose/repos","events_url":"https://api.github.com/users/yhirose/events{/privacy}","received_events_url":"https://api.github.com/users/yhirose/received_events","type":"User","site_admin":false},"created_at":"2018-11-23T02:09:03Z","updated_at":"2018-11-23T02:09:03Z","author_association":"OWNER","body":"@danesh-d, sorry for the late reply. A short answer is that cpp-httplib doesn't support 'server push'.\r\n\r\nBut if we implement SSE (Server-Sent Events) support in cpp-httlib, it will be possible to push data to client. Please see [this blog article](https://medium.com/conectric-networks/a-look-at-server-sent-events-54a77f8d6ff7).\r\n\r\nI am not planning to implement it for now. But I'll keep this in mind. Thanks for your feedback!\r\n\r\n"}}
{"actor":{"display_login":"yhirose"}}