Matrix times are on seconds now. Removing POST matrix tests

This commit is contained in:
Jeff Miccolis
2016-03-29 17:28:55 -04:00
committed by Patrick Niklaus
parent 2f793473cc
commit eba5f7d275
5 changed files with 48 additions and 138 deletions
+1 -8
View File
@@ -21,16 +21,9 @@ module.exports = function () {
var runRequest = (cb) => {
var params = this.paramsToString(parameters);
this.query = baseUri + (params.length ? '/' + params : '');
var options = this.httpMethod === 'POST' ? {
method: 'POST',
body: params,
url: baseUri
} : this.query;
request(options, (err, res, body) => {
request(this.query, (err, res, body) => {
if (err && err.code === 'ECONNREFUSED') {
throw new Error('*** osrm-routed is not running.');
} else if (err && err.statusCode === 408) {
+1
View File
@@ -36,6 +36,7 @@ module.exports = function () {
var json = JSON.parse(body);
var hasRoute = json.code === 'ok';
//console.log(json.routes[0].legs[0].steps);
if (hasRoute) {
instructions = this.wayList(json.routes[0]);