changed http response and request implementation