Unexpected HTTP code: 400 The response is {"message":"Problem is too big. Use async POST request instead.","status":"finished"}

Hey all,

I am actually a beginner GH user. Currently, I am developing a PHP Client for a customer using the Routing Optimization API. Unfortunately, despite of all things that I have done, I receive still the response that the message is too big.

Here are my steps,

  1. Create the JSON including 150 Locations
  2. Gzip
  3. send it using curl to GH Server.

It works for 80 Locations already, but my customer has increased his license.

I do really appreciate, if anyone could help me.

As the error message suggests, you need to switch to the async endpoint as documented here: Documentation - GraphHopper Directions API

As a rule of thumb I can recommend you to solve Traveling Salesman problems (1 vehicle, x stops) with the synchronous endpoint and everything else with the asynchronous one.

apparently, it was a dummy Q, because I did everything except reading the documentation. Thanks a lot. It solved my issue.

Powered by Discourse