Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mock 如何处理中文? #78

Open
xnightsky opened this issue May 5, 2016 · 1 comment
Open

mock 如何处理中文? #78

xnightsky opened this issue May 5, 2016 · 1 comment

Comments

@xnightsky
Copy link

module.exports = {
  'GET /api': function(req, res){
    res.json(
      { "title": "中文" }
    );
    res.set("Content-Type", "application/json; charset=UTF-8");
  },
  "GET /api2": { "title": "中文2" },
};
@xnightsky
Copy link
Author

补充,正常AJAX中文显示正常, 裸链接(浏览器URL打开)打开乱码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant