Create User from Node.js Failure.
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, node.js
- 领域
- api
调研方向
首先,使用所示的版本和请求选项,复现向 /api/v2/users 入口点发送的 POST 请求。检查 Write API 在创建用户时如何处理 Authorization 标头和 accessToken,然后将该路径与报告的 setHeader 错误进行比较。当请求成功创建用户,或返回清晰且有文档说明的 API 错误时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
nodebb version 1.13.2
nodebb-plugin-write-api version 5.7.3
node.js version 12.14.1
post data:
username=Panama.City&password=12345678&email=panama.city%40domain.com
http request option:
{ hostname: 'localhost',
port: 4567,
path: '/api/v2/users',
method: 'POST',
timeout: 5000,
headers:
{ Authorization: 'Bearer <token>' } }
var req = require('http').request(options, (res) => {
let data = '';
// A chunk of data has been recieved.
res.on('data', (chunk) => {
data += chunk;
});
// The whole response has been received. Print out the result.
res.on('end', () => {
console.log(data);
var rt = JSON.parse(data);
if (callback) callback({status: 'success'});
});
req.on('error', (e) => {
if (callback) callback({status: 'failure'});
});
});
req.write(postData);
req.end();
Error: "value" required in setHeader("accessToken", value)
at validateHeader (_http_outgoing.js:492:11)
at ClientRequest.setHeader (_http_outgoing.js:501:3)
at new ClientRequest (_http_client.js:173:14)
at Object.request (http.js:38:10)
Any idea what I did wrong there? Thank you for an excellent plugin to an excellent forum platform.
- 主要语言
- JavaScript
- 星标
- 136
- 派生
- 75
- 平均合并
- 1 分钟
- 30 天内合并 PR
- 8
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NodeBB/nodebb-plugin-write-api 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 20/100
-
bug
NodeBB/nodebb-plugin-write-api#130 · 1 条评论 · 已指派 1 人 ·
-
难度 4/5 3-5 天 新手友好度 35/100
NodeBB/nodebb-plugin-write-api#118 · 4 条评论 ·
-
enhancement
NodeBB/nodebb-plugin-write-api#87 · 5 条评论 · 已指派 1 人 ·
-
难度 4/5 3-5 天 新手友好度 30/100
查看 NodeBB/nodebb-plugin-write-api 的全部 Issue
相似的 Issue
-
bug confirmed issue
难度 2/5 1-3 小时 新手友好度 75/100
open-webui/open-webui#30750 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
Mend: dependency security vulnerability untriaged
难度 2/5 1-3 小时 新手友好度 70/100