Using route editor works, now how to integrate?

Occasionally we get questions like:

I don’t understand how I can use your API with calling your url with my json. I can use the route editor
but that only solves the json problem that I paste in, but how I integrate your editor in our web?

You can use our JavaScript client which is used in our route editor to communicate with our API. Please see our examples which are open source too: demo.js and GraphHopperOptimization.js.

With the client.doRequest method you can post your custom created JSON to our API via JavaScript instead of using our route editor.