extract HTTP setup

Change-Id: If007866eeb4876a9de715e184b03b42947ce4fef