MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / make_request

Method make_request

scripts/routed_benchmark.py:66–72  ·  view source on GitHub ↗

Make one routed request

(self)

Source from the content-addressed store, hash-verified

64 return f"{self.url}/{toString(coords)}?overview=full&steps=true"
65
66 def make_request(self):
67 """Make one routed request"""
68 r = requests.get(self.make_url())
69 r.raise_for_status()
70 if r.json()["code"] != "Ok":
71 raise requests.HTTPError("code not OK")
72 self.distance = r.json()["routes"][0]["legs"][0]["distance"]
73
74
75def zip_longest(*iterables):

Callers 1

runFunction · 0.95

Calls 2

make_urlMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected