Consolidate http request/response parsing