Hello friends! At around 3am I was crying in my bed because sockets are annoying and take forever to implement. Then the idea to create a HTTP REST wrapper dawned upon me.
I did some research and I don't think anyone has made this before but I've successfully created an early alpha version of the library. It's extremely easy to implement and I've taken care of the HTTP engine support, and method visibility from the REST calls.
Here's the plugin implementation, there's some extra code in there for me so I can test but it's about 25-ish real lines of code for the API.
This is the response from the browser, the convention is super simple, http://ADDR:PORT/ClassName/MethodName. The lib provides means to change the path so you don't have to keep the classname as a path. By default the lib returns application/json in the headers but all this is customizable so you can write your own website on here but it's main goal is to simplify HTTP REST for bukkit.
Let me know what you think! Is it a stupid idea? Would you use it? Any suggestions? Thanks!
I did some research and I don't think anyone has made this before but I've successfully created an early alpha version of the library. It's extremely easy to implement and I've taken care of the HTTP engine support, and method visibility from the REST calls.
Here's the plugin implementation, there's some extra code in there for me so I can test but it's about 25-ish real lines of code for the API.
This is the response from the browser, the convention is super simple, http://ADDR:PORT/ClassName/MethodName. The lib provides means to change the path so you don't have to keep the classname as a path. By default the lib returns application/json in the headers but all this is customizable so you can write your own website on here but it's main goal is to simplify HTTP REST for bukkit.
Let me know what you think! Is it a stupid idea? Would you use it? Any suggestions? Thanks!
