diff --git a/klippy/extras/request_url.py b/klippy/extras/request_url.py index 4855464627a5..395bdcf9798c 100644 --- a/klippy/extras/request_url.py +++ b/klippy/extras/request_url.py @@ -125,6 +125,9 @@ def cmd_HTTP_REQUEST(self, gcmd): self.method = gcmd.get("METHOD", self.method) self.url = gcmd.get("URL", self.url) self.body = gcmd.get("BODY", self.body) + gcode_script = gcmd.get("GCODE", None) + if gcode_script is not None: + self.body = '{"script": "%s"}' % gcode_script self.headers = gcmd.get("HEADERS", self.headers) self.repeat = gcmd.get_float('REPEAT', self.repeat) self.isloginfo = gcmd.get_int('LOG', self.isloginfo)