MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / get

Method get

atomic-remote/src/storage.rs:118–130  ·  view source on GitHub ↗

GET request, unwrap `ApiResponse` envelope.

(&self, path: &str)

Source from the content-addressed store, hash-verified

116
117 /// GET request, unwrap `ApiResponse` envelope.
118 pub async fn get<T: DeserializeOwned>(&self, path: &str) -> Result<T, RemoteError> {
119 let url = format!("{}{}", self.base_url, path);
120 log::debug!("GET {}", url);
121
122 let resp = self
123 .http
124 .get(&url)
125 .send()
126 .await
127 .map_err(|e| RemoteError::other(format!("request failed: {}", e)))?;
128
129 self.handle_response(resp).await
130 }
131
132 /// POST request with JSON body, unwrap `ApiResponse` envelope.
133 pub async fn post<B: Serialize, T: DeserializeOwned>(

Callers

nothing calls this directly

Calls 2

handle_responseMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected