Guest User

Untitled

a guest
Sep 30th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. self.fetch_task = fetch! {
  2. LoginCredentials { // the request struct from the core
  3. username: "username".to_owned(),
  4. password: "password".to_owned(),
  5. } => API_URL_LOGIN_CREDENTIALS, // reuse the global API constants
  6. self.component_link, // the current component
  7. Message::Fetch, // the message type for the component
  8. || {}, // Do something on success
  9. || {}, // Do something on error
  10. };
Add Comment
Please, Sign In to add comment