POST vs GET requests

2 posts / 0 new
Last post
iwaraich
POST vs GET requests

Hi

When making a call via the following:

L.mapquest.directions().route(routeOptions, function(err, response) {

Looking at the network monitor in Google Chrome, the data is sent as a GET request - as posted below (key removed).  When the requested route has a lot of entries (approx 5k in character length) we are seeing instances where the requested route is truncated and the API returns an error as only the truncated JSON appears to be sent - possibly due to browser restrictions on URL lengths.

Rather than making a GET request, is there an option to force L.mapquest.directions().route to make a POST request instead?  Any help apprecated!

Thanks.

 

  1. Request URL:

     

  2. https://open.mapquestapi.com/directions/v2/route?key=XXXXXXXXXXXXXXXXXXX...
  3. Request Method:

     

  4. Request URL:

    https://open.mapquestapi.com/directions/v2/route?key=XXXXXXXXXXXXXXXXXXX...

  5.  
  6. Request Method:

    GET

  7. Status Code:

    200 OK

  8. Remote Address:

    34.233.228.191:443

  9. Referrer Policy:

    no-referrer-when-downgrade

  10. Status Code:

    200 OK

  11. Remote Address:

    34.233.228.191:443

  12. Referrer Policy:

    no-referrer-when-downgrade


MQBrianCoakley
No, there is not a post
No, there is not a post option. The app could make its own post request to the api and put the results on the map if needed.