update HTTPProvider and add tests