Correct response handling, add http support