roadie/RoadieApi/Services/HttpContext.cs
Steven Hildreth 71d57b6925 WIP
2018-11-06 15:55:31 -06:00

22 lines
623 B
C#

using Microsoft.AspNetCore.Mvc;
using Roadie.Library.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Roadie.Api.Services
{
public class HttpContext : IHttpContext
{
public string BaseUrl { get; set; }
public string ImageBaseUrl { get; set; }
public HttpContext(IUrlHelper urlHelper)
{
this.BaseUrl = $"{ urlHelper.ActionContext.HttpContext.Request.Scheme}://{ urlHelper.ActionContext.HttpContext.Request.Host }";
this.ImageBaseUrl = $"{ this.BaseUrl}/image";
}
}
}