is it possible to have plugin listen to a port and accept http requests?
It was easy enough to find information how to make http requests from plugin, but I couldn't find information on setting up a http server.
When running Intellij I can see it is listening to one port (Ultimate is listening on 3 ports), so there is some built in web server. Is it possible to use that web server or add some filters to existing incoming requests?
All hints and references highly appreciated!
请先登录再写评论。
Take a look at the com.intellij.httpRequestHandler extension point. Easiest way of using it is to extend org.jetbrains.ide.RestService.
Thank you Jamie!
It was exactly what I needed.
I extended RestService
requested 127.0.0.1:63343/api.keymapSwitcher
and it worked