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等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)