Internal function to handle HTTP requests to the API with error handling
and response parsing.
Usage
mw_request(client, endpoint, parse = TRUE, format = NULL, ...)
Arguments
- client
An mw_rest_client object
- endpoint
Character. API endpoint path
- parse
Logical. Should the response be parsed? (default: TRUE)
- format
Character. Output format ("json" or "txt")
- ...
Additional parameters passed to httr2::req_perform
Value
Parsed API response (list for JSON, character for text)