readme formatting
This commit is contained in:
parent
5f48f0fc8a
commit
44786dfb68
@ -134,7 +134,10 @@ The HTTP standard describes a [Cache-Control request header](https://developer.m
|
|||||||
```js
|
```js
|
||||||
import fetch from 'node-fetch-cache';
|
import fetch from 'node-fetch-cache';
|
||||||
|
|
||||||
const response = await fetch('https://google.com', { headers: { 'Cache-Control': 'only-if-cached' } });
|
const response = await fetch('https://google.com', {
|
||||||
|
headers: { 'Cache-Control': 'only-if-cached' }
|
||||||
|
});
|
||||||
|
|
||||||
if (response === undefined) {
|
if (response === undefined) {
|
||||||
// No response was found in the cache
|
// No response was found in the cache
|
||||||
}
|
}
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "node-fetch-cache",
|
"name": "node-fetch-cache",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "node-fetch-cache",
|
"name": "node-fetch-cache",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cacache": "^15.2.0",
|
"cacache": "^15.2.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-fetch-cache",
|
"name": "node-fetch-cache",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"description": "node-fetch with caching.",
|
"description": "node-fetch with caching.",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
Reference in New Issue
Block a user