| CLASS info |
| public final class NetworkTool |
| 使用指定参数构建cookie的帮助类。 |
| Return type | Method name |
| static String | public static String buildNetworkUrl(String domain, Boolean isUseHttps) 根据域名以及isUseHttps返回cookie url。 |
| static String | public static String buildNetworkCookie(String cookieName, String cookieValue, String domain, String path, Boolean isHttpOnly, Boolean isSecure, Long maxAge) 根据输入的值来拼接构造Cookie。 |
| Method |
| public static String buildNetworkUrl(String domain, Boolean isUseHttps) |
| 根据域名以及isUseHttps返回cookie url。 |
Parameters
| Parameter name | Parameter desc |
| domain | 域名。 |
| isUseHttps | true表示https,false表示http。 |
Return
| type | desc |
| String | cookie url。 |
| Method |
| public static String buildNetworkCookie(String cookieName, String cookieValue, String domain, String path, Boolean isHttpOnly, Boolean isSecure, Long maxAge) |
| 根据输入的值来拼接构造Cookie。 |
Parameters
| Parameter name | Parameter desc |
| cookieName | cookie名称。 |
| cookieValue | cookie值。 |
| domain | cookie的域名。 |
| path | 可以访问此cookie的页面路径。 |
| isHttpOnly | true表示只有在http请求头中会带有此cookie的信息,而不能通过document.cookie来访问此cookie。 |
| isSecure | true:只能通过https传输此cookie,false:可以通过http传输此cookie。 |
| maxAge | cookie的生存期,单位秒。 |
Return
| type | desc |
| String | 拼接后的cookie数据。 |