diff --git a/src/common/APIRequest.hpp b/src/common/APIRequest.hpp index cb118c457..9d8ec9b97 100644 --- a/src/common/APIRequest.hpp +++ b/src/common/APIRequest.hpp @@ -44,6 +44,15 @@ public: APIRequest(const APIRequest &other) = delete; APIRequest &operator=(const APIRequest &other) = delete; + /** + * @brief Constructs an APIRequest instance and a APIRequestData. + * + * @param[successTransformer] a function that will transform a NetworkResult into the desired type (OkType), for example decode JSON + * @param[errorTransformer] an optional function that will transform a NetworkResult into the desired type (ErrorType) + * @param[onFinally] an optional function that will be called regardless of the status. This is explicitly different from calling finally(...) as this is for cleanup of the decoding/transformer logic, they are separate + * + * APIRequest is a wrapper around NetworkRequest + */ explicit APIRequest( QUrl url, NetworkRequestType requestType, std::function successTransformer,