1

I am calling the CartoDB sql.execute() function with a rather large WKT geometry in the SQL query and this is causing a "414 Request-URI Too Large" error on the server b/c it is making a GET request.

My question is how to I make the sql.execute() function make a POST instead of a GET so I can perform a large SQL query?

2

you can use type option in execute:

sql.execute(sql, vars, { type: 'POST' }, callback)

I filed a ticket to switch to POST when the query is too large: https://github.com/CartoDB/cartodb.js/issues/112

In any case if you could rewrite sql to fit GET lenght it will be much better because cartodb can use caching

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.