WebApi中,怎么获取接口调用者的外网ip地址

WebApi中,怎么获取接口调用者的外网ip地址,第1张

It's possible to do that, but not very discoverable - you need to use

the property bag from the incoming request, and the property you need

to access depends on whether you're using the Web API under IIS

(webhosted) or self-hosted The code below shows how this can be done

private string GetClientIp(>

@RequestMapping(value="")

public void test(>

<html>

<head>

<meta >

以上就是关于WebApi中,怎么获取接口调用者的外网ip地址全部的内容,包括:WebApi中,怎么获取接口调用者的外网ip地址、如何设置CentOS 7获取动态及静态IP地址、java的spring-restful接口怎么获取客户端ip等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/9474817.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-28
下一篇 2023-04-28

发表评论

登录后才能评论

评论列表(0条)

保存