(path: &str)
| 2580 | |
| 2581 | #[cfg(not(feature = "mock"))] |
| 2582 | async fn get_admin_gpt2api_rs<T>(path: &str) -> Result<T, String> |
| 2583 | where |
| 2584 | T: DeserializeOwned, |
| 2585 | { |
| 2586 | let url = format!("{}/admin/gpt2api-rs{path}", admin_base()); |
| 2587 | let response = api_get(&url) |
| 2588 | .send() |
| 2589 | .await |
| 2590 | .map_err(|e| format!("Network error: {:?}", e))?; |
| 2591 | parse_admin_gpt2api_rs_response(response).await |
| 2592 | } |
| 2593 | |
| 2594 | #[cfg(not(feature = "mock"))] |
| 2595 | async fn post_admin_gpt2api_rs<B, T>(path: &str, body: &B) -> Result<T, String> |
no test coverage detected