Resource interpreted as Document but transferred with MIME type application/json laravel异常请求返回警告
2017-03-11 18:44
811 查看
一般情况下,laravel在方法里可以向前端返回数组格式 return [],
框架可以自动将数组转成JSON字符串返回,但浏览器会报MIME类型警告,
如是做APP接口可以忽视该警告;
但在前端ajax异步请求时最好把返回的数组手动转化成json字符串返回,
也是就json_encode([]),这样就不会出现Resource interpreted as Document but transferred with MIME type application/json警告
框架可以自动将数组转成JSON字符串返回,但浏览器会报MIME类型警告,
如是做APP接口可以忽视该警告;
但在前端ajax异步请求时最好把返回的数组手动转化成json字符串返回,
也是就json_encode([]),这样就不会出现Resource interpreted as Document but transferred with MIME type application/json警告
相关文章推荐
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...
- 关于easyui Resource interpreted as Document but transferred with MIME type application/json
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json:
- ThinkPHP Resource interpreted as Document but transferred with MIME type application/json 导致js无效
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...
- 谷歌浏览器下在文本框中敲回车会下载。。。Resource interpreted as Document but transferred with MIME type application/json
- Resource interpreted as Document but transferred with MIME type application/json ...
- Resource interpreted as Document but transferred with MIME type application/json ...