Browse Source

Change func names from return_* to get_*

devel
lheimbs 5 years ago
parent
commit
f97d819d63
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      http-server

+ 6
- 6
http-server View File

@@ -15,11 +15,11 @@ class SimpleHandler(server.BaseHTTPRequestHandler):
query_components = parse.parse_qsl(query)

if path == "/":
msg = self.return_get_components(path, query, query_components)
msg = self.get_components(path, query, query_components)
elif path == "/ying":
msg = self.return_ying()
msg = self.get_ying()
elif path == "/yang":
msg = self.return_yang()
msg = self.get_yang()
elif path == "/squares":
msg = self.get_squares(query_components)
else:
@@ -47,15 +47,15 @@ class SimpleHandler(server.BaseHTTPRequestHandler):
return msg

def return_ying(self):
def get_ying(self):
msg = "<a href='/yang'>Ying</a>"
return msg
def return_yang(self):
def get_yang(self):
msg = "<a href='/ying'>Yang</a>"
return msg
def return_get_components(self, path, query, query_components):
def get_components(self, path, query, query_components):
msg = f"Path: {path}\nQuery: {query}\nComponents: {str(query_components)}"
return msg


Loading…
Cancel
Save