From fcf8902d33acba846ff3bfad3ce548e11d7d98a1 Mon Sep 17 00:00:00 2001 From: mitchell amihod Date: Fri, 9 Jun 2023 22:14:01 -0400 Subject: [PATCH 1/2] Fix the get guard --- misc/http_rest_client_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/http_rest_client_test.py b/misc/http_rest_client_test.py index 84d82fdc..16583a96 100644 --- a/misc/http_rest_client_test.py +++ b/misc/http_rest_client_test.py @@ -14,7 +14,7 @@ class HttpHandler(BaseHTTPRequestHandler): def do_GET(self): path, args = self.parse_url() - if path == 'name' in args: + if 'name' in args: name = args['name'][0] self.write_response(200, "text/plain", f"Hello, {name}!") From 6aea9ad694de4ab56f36a8bde55406f3db56163d Mon Sep 17 00:00:00 2001 From: mitchell amihod <4623+meeech@users.noreply.github.com> Date: Tue, 13 Jun 2023 19:32:40 -0400 Subject: [PATCH 2/2] Remove get since this is not supported by willow anyhow --- misc/http_rest_client_test.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/misc/http_rest_client_test.py b/misc/http_rest_client_test.py index 16583a96..ad9ad150 100644 --- a/misc/http_rest_client_test.py +++ b/misc/http_rest_client_test.py @@ -11,16 +11,6 @@ class HttpHandler(BaseHTTPRequestHandler): error_content_type = 'text/plain' error_message_format = "Error %(code)d: %(message)s" - def do_GET(self): - path, args = self.parse_url() - - if 'name' in args: - name = args['name'][0] - - self.write_response(200, "text/plain", f"Hello, {name}!") - else: - self.send_error(404, 'Not found') - def do_POST(self): body = self.read_body() print(str(self.headers))