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

query_components = parse.parse_qsl(query) query_components = parse.parse_qsl(query)


if path == "/": if path == "/":
msg = self.return_get_components(path, query, query_components)
msg = self.get_components(path, query, query_components)
elif path == "/ying": elif path == "/ying":
msg = self.return_ying()
msg = self.get_ying()
elif path == "/yang": elif path == "/yang":
msg = self.return_yang()
msg = self.get_yang()
elif path == "/squares": elif path == "/squares":
msg = self.get_squares(query_components) msg = self.get_squares(query_components)
else: else:
return msg return msg


def return_ying(self):
def get_ying(self):
msg = "<a href='/yang'>Ying</a>" msg = "<a href='/yang'>Ying</a>"
return msg return msg
def return_yang(self):
def get_yang(self):
msg = "<a href='/ying'>Yang</a>" msg = "<a href='/ying'>Yang</a>"
return msg 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)}" msg = f"Path: {path}\nQuery: {query}\nComponents: {str(query_components)}"
return msg return msg



Loading…
Cancel
Save