node.js - 如何在 TypeScript HTTP 请求中使用 DefaultCredentials
问题描述
需要帮助在 Typescript 中找到类似的这种 powershell 构造:
Invoke-WebRequest -Uri "http://internalurl" -Method Get -UseDefaultCredentials
我在打字稿中尝试了以下请求:
const options = {
url: `${this.endpoint}/API/${url}`,
withCredentials: true
};
const response = await request(options);
return JSON.parse(response);
不确定如何指定使用默认凭据的请求。
解决方案
推荐阅读
- angular - 删除一个数组内的一个项目,该项目位于另一个数组内的角度?
- php - PHP - 如何在数组中搜索相同的值对
- java - 尝试将 Faces servlet 加载到嵌入式 Tomcat 中,但找不到类
- r - R中的lm()中的“*”和“+”有什么区别?
- swift - 通过单击 swift 中的其他文本字段来退出文本字段
- javascript - Node.js 的编码问题
- gradle-kotlin-dsl - 如何在 kotlin dsl 中设置 javaexec 任务调试选项?
- javascript - 如何将两个词的值呈现到输入标签的 value 属性中(Express-Handlebars)
- amazon-web-services - 未发送电子邮件/没有错误 AWS/SES
- flutter - 简单的可扩展列表使底部溢出 x 像素