gulp-mock-server
Advanced tools
Comparing version 1.0.19 to 1.0.20
@@ -15,4 +15,4 @@ module.exports = [{ | ||
response: { | ||
name: "four" | ||
name: "第四个" | ||
} | ||
}]; |
{ | ||
"name": "gulp-mock-server", | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"description": "to be the most simple gulp mock tool in the world", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -127,2 +127,3 @@ # gulp-mock-server | ||
[sanyueyu](https://github.com/sanyueyu),[dstj](https://github.com/dstj),[elwayman02](https://github.com/elwayman02) | ||
[sanyueyu](https://github.com/sanyueyu),[dstj](https://github.com/dstj),[elwayman02](https://github.com/elwayman02), | ||
[walkcc](https://github.com/walkcc) |
@@ -12,5 +12,2 @@ var url = require('url'); | ||
return function(req, res, next){ | ||
console.log('====='); | ||
console.log(req.body); | ||
console.log('====='); | ||
// mt is mocktag 作为标示,相同url参数不同请求的数据不同 | ||
@@ -87,3 +84,3 @@ var mt = req.query.mt || req.body.mt || ''; | ||
if (urlObj.query&&urlObj.query.callback) { | ||
res.setHeader('Content-type', 'application/javascript'); | ||
res.setHeader('Content-type', 'application/javascript;charset=utf-8'); | ||
setTimeout(function() { | ||
@@ -93,3 +90,3 @@ res.end(urlObj.query.callback + '(' + JSON.stringify(inlineData || require(filePath)) + ')'); | ||
} else { | ||
res.setHeader('Content-Type', 'application/json'); | ||
res.setHeader('Content-Type', 'application/json;charset=utf-8'); | ||
setTimeout(function() { | ||
@@ -96,0 +93,0 @@ res.end(JSON.stringify(inlineData || require(filePath))); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36465
35
129