Improving http request class to automatically trim values