trim spaces from endpoint url also