There is a certain API i must call a number of times in order to retrieve some specific information.
I do this by making POST requests, with data = {...} (some dict which specifies to the API what exactly i want it to return)
Naturally, I want to do as few requests as possible in order to be efficient. The problem is, if my data dict is too big, I get Request Entity Too Large; 413 Request Entity Too Large : Message of length 4268 is too long.
I know that 4000 is the maximum message size, but I do not know how to make the dict as big as possible.
Note: The Content-Length in the header says '9481', but the error says the message length is 4268. Which suggests to me that these 2 are different things.
Is there ANY way calculating the message length before firing the request ?
Thank you