adds data and some url encoding