[英]replacement for npm package request
So, I am trying to upgrade a repo from a 3rd party project that is no longer maintained.因此,我正在尝试从不再维护的 3rd 方项目升级 repo。 The issue is it uses "request".
问题是它使用“请求”。 Here is a sample of the code
这是代码示例
To be clear... The package is called "REQUEST"要清楚...... package 被称为“请求”
request.post(
{
url: config.URL,
form: {
a: "checkToken",
webmasterid: sited,
token: token,
},
},
As I am not a expressJS/Socket.io guy, I am not sure what the new format would be and what I would do to fix this.因为我不是 expressJS/Socket.io 的人,所以我不确定新格式是什么以及我会做些什么来解决这个问题。 There are 48 different instances of request.post so I can only guess there is a solution.
request.post 有 48 个不同的实例,所以我只能猜测有一个解决方案。
Any help would be great!任何帮助都会很棒!
I FINALLY found an article that gave me the ability to choose based on what is needed.我终于找到了一篇文章,让我能够根据需要进行选择。 As I am only doing a simple post I could have done this a number of ways but I settled on GOT just so I know I am working on the right solution with something that is full featured.
因为我只是在做一个简单的帖子,所以我可以通过多种方式做到这一点,但我选择了 GOT,所以我知道我正在研究功能齐全的正确解决方案。
https://nodesource.com/blog/express-going-into-maintenance-mode https://nodesource.com/blog/express-going-into-maintenance-mode
I hope this helps someone else我希望这对其他人有帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.