通过 maplocal 功能可以实现mock返回的内容
但是无法返回异常 (如500错误 404 错误)
这个需要用到 rewrite 功能(tools 菜单下)
Rewrite Rule 中 type 选择 respoonse status
将match value 设置为200
replace value 设置为500
则接口会返回500错误
参考文档:http://stackoverflow.com/questions/14360125/is-it-possible-to-rewrite-a-status-code-with-charles-proxy