parse_response: Parse API Response
Description
This function parses the content of an HTTP response based on the specified format.
It supports JSON and plain text formats.
Usage
parse_response(response, format = "json")
Value
Parsed content from the response.
Arguments
- response
An HTTP response object.
- format
A string indicating the expected response format ("json" or "text").