Skip to content

Instantly share code, notes, and snippets.

@karussell
Last active April 9, 2020 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karussell/4b4ed86413b97d9fc6b5356f24b9b318 to your computer and use it in GitHub Desktop.
Save karussell/4b4ed86413b97d9fc6b5356f24b9b318 to your computer and use it in GitHub Desktop.
wget -q https://raw.githubusercontent.com/graphhopper/directions-api-js-client/master/route-optimization-examples/vrp_lonlat_new.json -O vrp.json
JOB_ID=$(curl -X POST -H "Content-Type: application/json" "http://localhost:8080/optimize" --data @vrp.json | cut -d'"' -f4)
sleep 2
curl -X GET "http://localhost:8080/solution/$JOB_ID"
@karussell
Copy link
Author

karussell commented May 31, 2018

wget -q https://raw.githubusercontent.com/graphhopper/directions-api-js-client/master/route-optimization-examples/vrp_lonlat_new.json -O vrp.json
API_KEY=
JOB_ID=$(curl -X POST -H "Content-Type: application/json" "https://graphhopper.com/api/1/vrp/optimize?key=$API_KEY" --data @vrp.json | cut -d'"' -f4)
sleep 2
curl -X GET "https://graphhopper.com/api/1/vrp/solution/$JOB_ID?key=$API_KEY"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment