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
|
||||
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) {
|
||||
// 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",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "node-fetch-cache",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cacache": "^15.2.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-fetch-cache",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.1",
|
||||
"description": "node-fetch with caching.",
|
||||
"main": "src/index.js",
|
||||
"type": "module",
|
||||
|
Reference in New Issue
Block a user