apex_request_executor library
Classes
- DefaultRestRequestExecutor
-
This class is a default implementation of the RestRequestExecutor, and uses
Client
from the "http" library (link:https://pub.dev/packages/http) for request execution. DefaultRestRequestExecutor supports regular Rest method requests and as well as multipart requests, see MultipartRestRequestBody for multipart request example. - RestRequestExecutor
- This abstract class is the main handler for http calls. Derive from this class and implement the execute method, which receives the RestRowRequest as an argument and returns RestRowResponse as a result. The actual http call should happen in the execute method's body. To create a RestClient instance, first and foremost you will need to provide an implementation of RestRequestExecutor to RestClient.builder as shown in the example below.