Commit c63757b4 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[webapi] Fix URL building

The current implementation lost the path of the
configured platform URL.
parent bca02c60
...@@ -79,9 +79,14 @@ class WebAPI(object): ...@@ -79,9 +79,14 @@ class WebAPI(object):
} }
def __build_url(self, path): def __build_url(self, path):
url = "{schema}://{host}{path}".format( platform = self.parsed.geturl()
schema=self.parsed[0], host=self.parsed[1], path=path if platform.endswith("/"):
) platform = platform[:-1]
if path.startswith("/"):
path = path[1:]
url = "{platform}/{path}".format(platform=platform, path=path)
return url return url
def get(self, path): 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