1.0.2 • Published 8 months ago

@ascorbic/loader-utils v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Astro loader utils

Utilities to help building Astro loaders

Installation

npm install @ascorbic/feed-utils astro@experimental--contentlayer

API

Conditional requests

Some APIs allow you to make conditional requests by providing an If-None-Match or If-Modified-Since header. This can be used to avoid downloading the same data multiple times. These helpers allow you to store the etag or last-modified value from a response and then use it to make a conditional request when updating later.

  • getConditionalHeaders

Get the headers needed to make a conditional request. Uses the etag and last-modified values from the meta store, and sets the If-None-Match or If-Modified-Since headers.

  • storeConditionalHeaders

Store the ETag or Last-Modified headers from a response in the meta store.

1.0.2

8 months ago

1.0.1

9 months ago

1.0.0

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago

0.0.0

11 months ago