pass $data to POST, PUT, DELETE