Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

.net core web api redirect to another page

$
0
0
<div class="votecell post-layout--left"> <div class="vote">0down votefavorite<div class="favoritecount"></div> </div> </div> <div class="postcell post-layout--right"> <div class="post-text" itemprop="text">

I have a web api I need to convert to api core 2. I have one issue I cannot seem to resolve. There is a redirect in the controller that uses 'Request.CreateResponse' which does not appear to be available in .net core?

publicHttpResponseMessageGet(){var response =Request.CreateResponse(HttpStatusCode.Redirect);
        response.Headers.Location=newUri("https://insight.intuit.com");return response;}

Any idea how I can modify this to work? Basically if a user does not pass any params we just send them to a web page.

Any help is appreciated.

</div> </div>

Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>