improving code clarity in post request