Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- self.fetch_task = fetch! {
- LoginCredentials { // the request struct from the core
- username: "username".to_owned(),
- password: "password".to_owned(),
- } => API_URL_LOGIN_CREDENTIALS, // reuse the global API constants
- self.component_link, // the current component
- Message::Fetch, // the message type for the component
- || {}, // Do something on success
- || {}, // Do something on error
- };
Add Comment
Please, Sign In to add comment