Proper content-type and url encoding