rearranged send_request parameters

This commit is contained in:
Andreas Gruß 2015-06-07 11:02:24 +02:00
parent 153d38f10c
commit b406844c96
3 changed files with 3 additions and 3 deletions

View File

@ -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"

View File

@ -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

View File

@ -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