apex_io library

Classes

RestRequest
This class represents the properties of rest request it allows to configure request's method, URL path by url, headers, requestConverterType which will convert the RestRequest to RestRowRequest, responseConverterType which will convert the RestRowResponse to RestResponse, and request encoding.
RestResponse
This class represents the response, get returned by RestClient.execute method. It contains the original request, the rowResponse instance of RestRowResponse, which contains all the response info, like the response headers, code, body bytes, and more (see RestRowResponse). The response parameter is converted response, which get created by provided RestResponseConverter, as an example the JsonToMapResponseConverter get the RestRowResponse.bodyBytes and convert them to Map.
RestRowRequest
This class represents more row level of RestRequest, which means it contains the converted Rest request's body and initial request. The rowBody get defined by the RestRequestConverter, for example the MapToJsonRequestConverter converts the Map body to JSON String, and get assigned to rowBody, then the converted JSON String file get used by RestRequestExecutor
RestRowResponse
This class represents the rest row response, which contains original request, the response code, response body bytes bodyBytes, headers, contentLength, and more meta info related to response. The instance of RestRowResponse get passed throughout to response middlewares and then to provided to RestResponseConverter from the RestRequest's instance.