Fixed legacy HttpClient code