rearranged send_request parameters
This commit is contained in:
parent
153d38f10c
commit
b406844c96
@ -26,7 +26,7 @@ rescue Timeout::Error
|
||||
raise "*** osrm-routed did not respond."
|
||||
end
|
||||
|
||||
def send_request uri, waypoints, timestamps, options
|
||||
def send_request uri, waypoints=[], options={}, timestamps=[]
|
||||
@query = uri.to_s
|
||||
Timeout.timeout(OSRM_TIMEOUT) do
|
||||
if @http_method.eql? "POST"
|
||||
|
@ -15,6 +15,6 @@ def request_matching trace=[], timestamps=[], options={}
|
||||
params = nil if params==""
|
||||
|
||||
uri = generate_request_url ("match" + '?' + params)
|
||||
response = send_request uri, trace, timestamps, options
|
||||
response = send_request uri, trace, options, timestamps
|
||||
end
|
||||
|
||||
|
@ -21,7 +21,7 @@ def request_path path, waypoints=[], options={}
|
||||
else
|
||||
uri = generate_request_url (path + '?' + params)
|
||||
end
|
||||
response = send_request uri, waypoints, {}, options
|
||||
response = send_request uri, waypoints, options
|
||||
end
|
||||
|
||||
def request_url path
|
||||
|
Loading…
Reference in New Issue
Block a user