common method for read http and init driver, fix metric validate

Change-Id: I32e4834d67507a6231676dd36b99870bcd73b3c8