TypeError: headers.forEach is not a function
at /mnt/e/git/mockit/mockit-routes/src/index.js:33:15
at Layer.handle [as handle_request] (/mnt/e/git/mockit/mockit-routes/node_modules/express/lib/router/layer.js:95:5)
at next (/mnt/e/git/mockit/mockit-routes/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/mnt/e/git/mockit/mockit-routes/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/mnt/e/git/mockit/mockit-routes/node_modules/express/lib/router/layer.js:95:5)
at /mnt/e/git/mockit/mockit-routes/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/mnt/e/git/mockit/mockit-routes/node_modules/express/lib/router/index.js:335:12)
at next (/mnt/e/git/mockit/mockit-routes/node_modules/express/lib/router/index.js:275:10)
at cors (/mnt/e/git/mockit/mockit-routes/node_modules/cors/lib/index.js:188:7)
at /mnt/e/git/mockit/mockit-routes/node_modules/cors/lib/index.js:224:17
Problem description:
the headers in routes.json should be an array of {header, value} objects as it is in root's routes.json
Hi there @boyney123 First of all, thanks for your brilliant work!
What you did:
Then visit http://localhost:3000/random
What happened:
Problem description:
the
headers
in routes.json should be an array of{header, value}
objects as it is in root'sroutes.json
Suggested solution:
Update
mockit-routes/configuration/routes.json