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

Method post_empty

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

POST with no request body, unwrap `ApiResponse` envelope.

(&self, path: &str)

Source from the content-addressed store, hash-verified

183
184 /// POST with no request body, unwrap `ApiResponse` envelope.
185 pub async fn post_empty<T: DeserializeOwned>(&self, path: &str) -> Result<T, RemoteError> {
186 let url = format!("{}{}", self.base_url, path);
187 log::debug!("POST {} (no body)", url);
188
189 let resp = self
190 .http
191 .post(&url)
192 .send()
193 .await
194 .map_err(|e| RemoteError::other(format!("request failed: {}", e)))?;
195
196 self.handle_response(resp).await
197 }
198
199 /// PUT request with JSON body, unwrap `ApiResponse` envelope.
200 pub async fn put<B: Serialize, T: DeserializeOwned>(

Callers 4

verify_domainFunction · 0.80
upgrade_orgFunction · 0.80
set_agent_epochMethod · 0.80
set_delegator_epochMethod · 0.80

Calls 2

postMethod · 0.80
handle_responseMethod · 0.80

Tested by

no test coverage detected