sample code: http get/post