Commit c63757b4 authored by Samuel GAIST's avatar Samuel GAIST

[webapi] Fix URL building

The current implementation lost the path of the
configured platform URL.
parent bca02c60
......@@ -79,9 +79,14 @@ class WebAPI(object):
}
def __build_url(self, path):
url = "{schema}://{host}{path}".format(
schema=self.parsed[0], host=self.parsed[1], path=path
)
platform = self.parsed.geturl()
if platform.endswith("/"):
platform = platform[:-1]
if path.startswith("/"):
path = path[1:]
url = "{platform}/{path}".format(platform=platform, path=path)
return url
def get(self, path):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment