fix http channel API and add a basic test