gpt4 book ai didi

c# - 如何获取在 asp.net 中使用我的 web api 的请求 url?

转载 作者:行者123 更新时间:2023-12-05 07:22:53 26 4
gpt4 key购买 nike

I already write a Web API method, now I want to get a client website URL who used my API method.

我尝试了这行代码,但我得到了我的 API URL。但我想要一个客户端 URL。

var requestUrl = Request.Url;

最佳答案

var clientRequest = HttpContext.Request.Headers["Referer"];

关于c# - 如何获取在 asp.net 中使用我的 web api 的请求 url?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56354418/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com