/// <summary> /// Gets the Multicode. /// </summary> /// <param name="multicodeParameter">The Multicode parameter request.</param> /// <returns></returns> public async Task <APIResponse> GetAllMultiCodes(MulticodeParameter multicodeParameter) { try { var client = httpClientFactory.CreateClient(BlogServiceOperation.serviceName); UriBuilder url = new UriBuilder(servicesConfig.Blog + BlogServiceOperation.GetAllMultiCodes()); url.Query = QueryStringHelper.ConvertToQueryString(multicodeParameter); var response = await client.GetAsync(url.ToString()); if (response.IsSuccessStatusCode) { var multicode = JsonConvert.DeserializeObject <List <MultiCodeResponse> >(await response.Content.ReadAsStringAsync()); return(new APIResponse(multicode, HttpStatusCode.OK)); } return(new APIResponse(response.StatusCode)); } catch (Exception ex) { logger.Error(ex, "Exception in method 'GetAllMultiCodes()'"); var exMessage = ex.InnerException != null ? ex.InnerException.Message : ex.Message; return(new APIResponse(exMessage, HttpStatusCode.InternalServerError)); } }