webhooks: Remove "method" parameter from webhook requests

Don't require or use the "method" parameter of requests.  This
simplifies the interface.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-08-11 16:54:17 -04:00
parent 7289af6560
commit 568393c941
4 changed files with 31 additions and 67 deletions

View file

@ -22,8 +22,6 @@ class QueryEndstops:
def get_status(self, eventtime):
return {'last_query': {name: value for name, value in self.last_state}}
def _handle_web_request(self, web_request):
if web_request.get_method() != 'GET':
raise web_request.error("Invalid Request Method")
gc_mutex = self.printer.lookup_object('gcode').get_mutex()
toolhead = self.printer.lookup_object('toolhead')
with gc_mutex: