DNAmaster10 / httpRequests

A Spigot plugin which allows player to send HTTP requests to a web server from an ingame command
MIT License
14 stars 3 forks source link

Implement direct response processing #9

Open DNAmaster10 opened 1 year ago

DNAmaster10 commented 1 year ago

An idea to implement extremely simple response processing without a response processing JS file. This would only allow for very simple response processing, such as if a response code = x, do y.

This can be done directly from the command

e.g "/httpsend POST http://example.com hello=1 x-encoding ifcommand: code, 100, time set 0"

What this would do, is check whether the response code is 100, and if so, execute "time set 0"

This could do the same for the body.

It's still unclear exactly how this could be implemented without changing the base command syntax.

One idea would be to force an encoding type to be entered if direct response processing should be used