melvin_ob/http_handler/http_response/
create_backup.rs

1use crate::http_handler::http_response::response_common::{
2    HTTPResponseType, JSONBodyHTTPResponseType, ResponseError,
3};
4
5/// Response type for the /backup endpoint -> GET
6#[cfg(debug_assertions)]
7pub(crate) struct CreateBackupResponse {}
8
9impl JSONBodyHTTPResponseType for CreateBackupResponse {}
10
11impl HTTPResponseType for CreateBackupResponse {
12    /// The parsed type of the response.
13    type ParsedResponseType = String;
14
15    /// reads the HTTP Response Json Body
16    async fn read_response(
17        response: reqwest::Response,
18    ) -> Result<Self::ParsedResponseType, ResponseError> {
19        let resp = Self::unwrap_return_code(response).await?;
20        Self::parse_json_body(resp).await
21    }
22}