public IDictionary<string, string> GetDataFromRequest(WebRequest request)
{
try
{
_logger.Debug("Start to read request.");
var responseDataStream = request.GetRequestStream();
var reader = new StreamReader(responseDataStream);
var json = reader.ReadToEnd();
_logger.Debug("End to read request, start to Deserialize Json");
return JsonSerializerService.DeserializeFromString(json);
}
catch (Exception ex)
{
_logger.Error(string.Format("Error when get response from url: {0} and method: {1}", request.RequestUri, request.Method), ex);
throw;
}
}