split HttpRequest to Curl and Socket class