How store data in local storage and pass the same when connectivity is available

Hi Team

I need to Pass data throught HTTP methods(post,get) this is working fine for me…since Net connectivity is available

My requirement is data should be stored in Local storage when net Connectivity is not available…and data

should be passed once connectivity available how to do this

it form Data like

name,phone number, and mail id…