Refactored azure rest template to remove socket factory creation