ArmedCards.Web.Controllers.AccountController.Image C# (CSharp) Method

Image() public method

public Image ( string hash ) : System.Web.Mvc.ActionResult
hash string
return System.Web.Mvc.ActionResult
        public ActionResult Image(string hash)
        {
            HttpResponseMessage result = new HttpClient().GetAsync( String.Format("https://s.gravatar.com/avatar/{0}?s=100&r=pg", Library.Helpers.EncryptUtil.Decrypt(hash))).Result;

            System.IO.Stream stream =
                 result.Content.ReadAsStreamAsync().Result;

            return new FileStreamResult(stream, result.Content.Headers.ContentType.ToString());
        }