Answer the question
In order to leave comments, you need to log in
Is it possible to limit the response size from a REST API?
I have a problem, my REST API is giving too big a response. Is it possible, purely theoretically, to limit his answer? Yes, I know that this needs to be solved on the side of the REST API backend, but is it still possible? It seems to me that there is no twist, I will cut off a piece of json code, and it will be unreadable!
Answer the question
In order to leave comments, you need to log in
1. too big - the concept is subjective.
I worked with api whose response size was in the tens and even hundreds of megabytes.
2. Of course, the size limitation is not made at the "cut off a piece of the answer" level, but at the business logic level.
If this is some kind of too large list, we make it possible to request with limit / offset.
If there are some heavy fields in the objects that are returned, we make it possible to exclude these fields from the answer,
etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question