expose api as POST not GET

This commit is contained in:
Lex Berezhny 2020-07-20 23:48:27 -04:00
parent 8d164dfed3
commit 8100efb48c

View file

@ -79,8 +79,7 @@ class Daemon:
# streams[event_name] = WeakSet() # streams[event_name] = WeakSet()
# event_stream.listen(partial(self.broadcast_event, component.name, event_name)) # event_stream.listen(partial(self.broadcast_event, component.name, event_name))
self.app.router.add_get('/ws', self.on_connect) self.app.router.add_get('/ws', self.on_connect)
self.app.router.add_get('/lbryapi', self.on_rpc) self.app.router.add_post('/api', self.on_rpc)
self.app.router.add_get('/api', self.on_rpc)
self.app.on_shutdown.append(self.on_shutdown) self.app.on_shutdown.append(self.on_shutdown)
self.runner = AppRunner(self.app) self.runner = AppRunner(self.app)