implementing saving post and put requests, calling the requests when device comes online etc