fetch()返回的promise将不会拒绝http的错误状态,即使响应是一个HTTP 404或者500。 服务器端返回 状态码 400 500的时候 不会reject Response.ok 属性为 true。 2、在默认情况下 fetch不会接受或者发送cookies ,要发送 cookies,必须设置 credentials 选项。 credentials: ‘include’
乐观 积极 快 用技术成就梦想
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true