Fixed http request synchronization issue, refactored http request class