Added a method to XHttpClient