You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's some pseudo-code of what I'm after. Maybe you can set me straight?:
Service (background thread?)
class Auth:
api = wrap('http://foo.com/api/v1/')
def register(body):
return api('/register').post(body)
def login(body):
return api('/login').post(body)
Frontend
class AuthActivity:
auth = Auth()
# logic goes here
self.auth.login(input.email, input.password).exec((err, res, statusCode, headers) {
# Alternatively put std logic like this in the service (like an Angular service)
# new context-specific logic can still be added here; service returns promise
if err or statusCode/100 > 3:
log(statusCode, err.body or res.body)
else:
# handle it
})
# logic goes here
self.auth.register(**input)
# logic goes here
The text was updated successfully, but these errors were encountered:
I'm new to Java and was a little taken aback by the verbosity and boilerplate. Was following your sample/services/ExampleIntentService.java and sample/IntentServiceSample.java examples.
Here's some pseudo-code of what I'm after. Maybe you can set me straight?:
Service (background thread?)
Frontend
The text was updated successfully, but these errors were encountered: