save

Saves the entire content of this HttpClientCall to memory and returns a new HttpClientCall with the content cached in memory. This can be particularly useful for caching, debugging, or processing responses without relying on the original network stream.

By caching the content, this function simplifies the management of the HttpResponse lifecycle. It releases the network connection and other resources associated with the original HttpResponse, ensuring they are no longer required to be explicitly closed.

This behavior is automatically applied to non-streaming HttpResponse instances. For streaming responses, this function allows you to convert them into a memory-based representation.

Return

A new HttpClientCall instance with all its content stored in memory.