Improve Http constructor to check  object