In this post, we will see how to resolve Does Angular API only call requested data?
Question:I am making an api call and want make sure I am reducing data transfer as much as possible.
on the Angular end I have a request:
Best Answer:When you make this call:
RecordSummaryobject. It does not communicate this object structure to the API, so you will still be receiving the full object that the API sends.
You can confirm this by looking at the network request in your browser’s developer tools window. For Chrome you can open this by pressing F12.
RecordSummaryobject, the actual object in-memory will have more data in it if the API sent more. You can observe this by casting it to
anyand then accessing one of the properties:
If you have better answer, please add a comment about this, thank you!