小编Rei*_*eid的帖子

何时将TLS 1.2支持添加到OpenSSL?

OpenSSL 0.9.8x是否支持TLS1.2?我查看了OpenSSL的更改日志,但没有找到任何相关信息:https://www.openssl.org/news/changelog.html

openssl tls1.2

19
推荐指数
1
解决办法
3万
查看次数

使用 HttpParams 和 FromObject 有条件地添加参数并使用变量作为键名

有没有办法使用 HttpParams 和 fromObject 有条件地添加参数?我尝试在实例化 HttpParams 后添加条件参数,但这不起作用:

const params = new HttpParams({
  fromObject : {
    requiredParam: 'requiredParam'
  }
});

if (addOptionalParam)
      params.append('optionalParamKey', 'optionalParamValue');
Run Code Online (Sandbox Code Playgroud)

另外,我可以使用常量变量作为 fromObject 参数的键吗?我试过这个,但它不起作用:

  const ConstantVariableForKeyName = 'key';
  const params = new HttpParams({
  fromObject : {
    {{ConstantVariableForKeyName}}: 'paramValue'
  }
});
Run Code Online (Sandbox Code Playgroud)

http-parameters angular angular-httpclient angular6

4
推荐指数
1
解决办法
1801
查看次数