Grammarbot api的问题与节点js集成
我已经使用node.js作为我的应用程序的API。在这种情况下,我使用了npm已经给出的节点程序包,但是由于错误的请求,它给了我错误。我已经使用npm提供的两种方法进行了尝试。
const bot = new Grammarbot({
API_key: "XXXXXX",
language: "en-US",
base_uri: "api.grammarbot.io",
});
bot.check("I can't remember how to go their", function (error, result) {
if (!error) console.log(JSON.stringify(result));
});
类似错误
{
"timestamp": "2019-10-10T10:20:38.301+0000",
"status": 400,
"error": "Bad Request",
"message": "Required String parameter 'text' is not present",
"path": "/v2/check"
}
回答如下:我在GrammarBot Nodejs库中进行了一些更改,并以npm包的形式上传。请安装以下软件包并运行...
npm i custom-grammar-bot-api --save
Grammarbot api的问题与节点js集成
我已经使用node.js作为我的应用程序的API。在这种情况下,我使用了npm已经给出的节点程序包,但是由于错误的请求,它给了我错误。我已经使用npm提供的两种方法进行了尝试。
const bot = new Grammarbot({
API_key: "XXXXXX",
language: "en-US",
base_uri: "api.grammarbot.io",
});
bot.check("I can't remember how to go their", function (error, result) {
if (!error) console.log(JSON.stringify(result));
});
类似错误
{
"timestamp": "2019-10-10T10:20:38.301+0000",
"status": 400,
"error": "Bad Request",
"message": "Required String parameter 'text' is not present",
"path": "/v2/check"
}
回答如下:我在GrammarBot Nodejs库中进行了一些更改,并以npm包的形式上传。请安装以下软件包并运行...
npm i custom-grammar-bot-api --save