Return path
from _path_data()
(rest_api.py)
This commit is contained in:
parent
e84f91977c
commit
4a68baa0a6
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
||||||
_, _, endpoint = path[1:].partition("/")
|
_, _, endpoint = path[1:].partition("/")
|
||||||
endpoint, _, args = endpoint.partition("/")
|
endpoint, _, args = endpoint.partition("/")
|
||||||
args = list(filter(None, args.split("/")))
|
args = list(filter(None, args.split("/")))
|
||||||
return endpoint, args
|
return path, endpoint, args
|
||||||
|
|
||||||
def _url_params(self):
|
def _url_params(self):
|
||||||
parsed = urllib.parse.urlparse(self.path)
|
parsed = urllib.parse.urlparse(self.path)
|
||||||
|
@ -27,7 +27,7 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
||||||
return self.rfile.read(content_length)
|
return self.rfile.read(content_length)
|
||||||
|
|
||||||
def _handle(self, method):
|
def _handle(self, method):
|
||||||
endpoint, args = self._path_data()
|
path, endpoint, args = self._path_data()
|
||||||
headers = utils.CaseInsensitiveDict(dict(self.headers.items()))
|
headers = utils.CaseInsensitiveDict(dict(self.headers.items()))
|
||||||
params = self._url_params()
|
params = self._url_params()
|
||||||
data = self._body()
|
data = self._body()
|
||||||
|
|
Loading…
Reference in a new issue