LLMS_Abstract_API_Handler
3rd Party API request handler abstract class
Description Description
Source Source
File: includes/abstracts/llms.abstract.api.handler.php
Changelog Changelog
Version | Description |
---|---|
3.30.1 | self::set_request_body() may respond with null in order to send a request with no body . |
3.11.2 | Introduced. |
Methods Methods
- __construct — Construct an API call, parameters are passed to private `call()` function
- call — Execute an API request.
- get_error_message — Retrieve the private "error_message" variable
- get_error_object — Get the private "error_object" variable
- get_error_type — Retrieve the private "error_type" variable
- get_result — Retrieve the private "result" variable
- is_error — Determine if the response is an error
- parse_response — Parse the body of the response and set a success/error
- set_error — Set an Error Sets all error variables and sets the result as a WP_Error so the result can always be tested with `is_wp_error()`
- set_request_body — Set request body
- set_request_headers — Set request headers
- set_request_url — Set the request URL
- set_result — Set the result
- set_user_agent — Set the request User Agent Can be overridden by extending classes when necessary