RequestUtil

RequestUtil

https://gitee.com/yichengxian/testing-express/blob/main/testing-common/util/ClientUtil.js

Constructor

new RequestUtil()

Source:
Author:
  • ycx
请求工具类

Methods

(static) getClientIp(request, …otherHeaderNames) → {string}

Source:
获取客户端ip
Parameters:
Name Type Attributes Description
request Request request对象
otherHeaderNames string <repeatable>
另外的header数组 可选
Returns:
客户端IP
Type
string

(static) getClientIpByHeaders(request, …otherHeaderNames) → {string}

Source:
获取客户端IP
Parameters:
Name Type Attributes Description
request Request 请求头
otherHeaderNames string <repeatable>
其他header数组
Returns:
客户端IP
Type
string