parker-codes / coda-js

An eloquent Node API for interacting with your Coda Docs.
39 stars 9 forks source link

414 response on POST #2

Closed mjoyce closed 5 years ago

mjoyce commented 5 years ago

Requests are being sent with both data and params props, regardless of request method. On a POST (or any method that should send data instead of params) this will result in a 414 response when a large enough payload ends up in the url.

async request(url, params = {}, method = 'GET') {
  try {
    return await axios({ method, url, data: params, params });
  } catch (error) {
    console.error(error);
  }
}
parker-codes commented 5 years ago

@mjoyce You are absolutely correct. Is this something you want to patch?