restc,一个用于调试 RESTful 接口的 HTTP 服务器中间件
restc,一个用于调试 RESTful 接口的 HTTP 服务器中间件,直接用浏览器打开即可看到格式化和高亮的结果以及 HTTP 头,简单粗暴,我们提供了 Express / Koa 和 Nginx 大法版
Node.js HTTP工具
共1290Star
详细介绍
Introduction
restc is an HTTP server middleware, aiming to enhance debugging experience on RESTful APIs.
It can be easily integrated with popular HTTP frameworks. You will see:
- formatted JSON responses in the browser
- a debug panel with which you can send GET, POST, PUT, PATCH and DELETE requests directly in the browser
You can even share a request by sharing its URL directly to others and everything will be automatically filled in the panel.
Getting Started
npm install --save restc
Use the middleware
const restc = require('restc');
// for express
app.use(restc.express());
// for koa
app.use(restc.koa());
// ...and koa2
app.use(restc.koa2());
// for hapi
server.register(restc.hapi)
// for hapi of legacy version
server.register([{
register: restc.hapiLegacy
}], (err) => {
if (err) {
throw err
}
})
-
8 Star
-
0 Star
-
0 Star
-
0 Star
-
4906 Star
-
3263 Star
-
0 Star
-
9 Star
-
4 Star