More

    Get request url in asp.net core api

    using Microsoft.AspNetCore.Http.Extensions; 
    
    
    var url = httpContext.Request.GetEncodedUrl();
    or
    
    var url = httpContext.Request.GetDisplayUrl();
    depending on the purposes.
    //get request url in asp.net core
    using Microsoft.AspNetCore.Http.Extensions; 
    
    
    var url = httpContext.Request.GetEncodedUrl();
    //or
    var url = httpContext.Request.GetDisplayUrl();
    //or
    var url = HttpContext.Current.Request.Url.AbsoluteUri;

    Recent Articles

    spot_img

    Related Stories

    Stay on op - Ge the daily news in your inbox