Fix input http and add a basic test