http-problem-details:该库为使用Node.js构建的HTTP API实现了HTTP问题详细信息(RFC 7807)

时间:2024-05-22 07:43:08
【文件属性】:

文件名称:http-problem-details:该库为使用Node.js构建的HTTP API实现了HTTP问题详细信息(RFC 7807)

文件大小:118KB

文件格式:ZIP

更新时间:2024-05-22 07:43:08

nodejs http node rest error-messages

Node.js的HTTP问题详细信息(RFC 7807) 该库为HTTP API实现了HTTP问题详细信息(RFC 7807)。 安装 npm install http-problem-details 或者 yarn add http-problem-details 用法 http-problem-details当前支持以下选项: type (字符串)-标识问题类型的URI引用[ ]。 title (字符串)-问题类型的简短易读摘要。 status (数字)-源服务器针对此问题的发生而生成的HTTP状态代码( )。 如果仅提供status则type将设置为about:blank并且title将成为HTTP规范中的原因短语,例如,如果status为404则为“ Not Found”。 instance (stringt)-标识问题特定发生的URI引用。 扩展成员-提供其他信息。


【文件预览】:
http-problem-details-master
----.gitignore(4KB)
----.eslintrc(283B)
----package.json(2KB)
----package-lock.json(184KB)
----src()
--------ProblemDocument.ts(2KB)
--------StatusCodes.ts(1KB)
--------index.ts(136B)
----tsconfig-build.json(355B)
----LICENSE(1KB)
----CHANGELOG.md(1KB)
----tsconfig.json(370B)
----README.md(5KB)
----.eslintignore(5B)
----.circleci()
--------config.yml(982B)
----.npmignore(43B)
----test()
--------ProblemDocumentTests.ts(4KB)
----.editorconfig(262B)
----yarn.lock(147KB)

网友评论