MCPcopy Index your code
hub / github.com/endbasic/endbasic / signup

Method signup

client/src/cloud.rs:157–171  ·  view source on GitHub ↗
(&mut self, request: &SignupRequest)

Source from the content-addressed store, hash-verified

155#[async_trait(?Send)]
156impl Service for CloudService {
157 async fn signup(&mut self, request: &SignupRequest) -> io::Result<()> {
158 let response = self
159 .client
160 .post(self.make_url("api/signup"))
161 .headers(self.default_headers())
162 .header("Content-Type", "application/json")
163 .body(serde_json::to_vec(&request)?)
164 .send()
165 .await
166 .map_err(reqwest_error_to_io_error)?;
167 match response.status() {
168 StatusCode::OK => Ok(()),
169 _ => Err(http_response_to_io_error(response).await),
170 }
171 }
172
173 async fn login(&mut self, username: &str, password: &str) -> io::Result<LoginResponse> {
174 // TODO(https://github.com/seanmonstar/reqwest/pull/1096): Replace with a basic_auth()

Callers 1

async_execMethod · 0.45

Calls 3

make_urlMethod · 0.80
default_headersMethod · 0.80

Tested by

no test coverage detected