Add function to post data to the background