I'm trying to manage my Meteor web app's API usage and have two questions.
- How do I know how the size of the incoming POST request data? Note that I don't care about the contribution from headers; I just want to know the size of the data part.
- How do I calculate a priori the amount of data that will be transferred if I respond to an HTTP call with JSON?
I am open to using Iron Router or Node's HTTP package. I previously asked about setting some limits, but in this case I want to calculate and keep track of how much data is going in and out of my app.
content-length
, but from what I understand, this field isn't guaranteed. Could you check the size of the retrieved POST data after it has arrived? Node also specifies that