How to send and save status(Success/Failure) back to user after performed any activities?

community

#1

I want to send and save success and failure status to an users after doing operations like registration and login and more.

But, i have no idea how send back the response.Actually, i have not too much experience.

The platform on which i am developing application is Android.

Please, give me some guide.

Thanks,
@aamir_rais


#2

All successful requests return some data. For example, a successful GET will return the data requested. A successful POST for inserting a record returns the ID of the newly inserted record.
You can use these clues to generate a success message for your user.

Any unsuccessful request will have a in the json response a key called “code” which tells you the error code. By checking for the existence of the “code” key in the response, you can assume a failure and generate a message for that.