update example activity to handle clear and create post request