@fgrzl/fetch 0.1.0-alpha.26 → 0.1.0-alpha.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +4 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -30,20 +30,18 @@ const data = await api.get("/api/user");
30
30
  Or create a custom instance:
31
31
 
32
32
  ```ts
33
- import { FetchClient } from "./client";
34
- import { useCSRF } from "./csrf";
35
- import { useUnauthorized } from "./unauthorized";
33
+ import { FetchClient, useCSRF, useUnauthorized } from "@fgrzl/fetch";
36
34
 
37
- const api = new FetchClient({
35
+ const client = new FetchClient({
38
36
  credentials: "same-origin",
39
37
  });
40
38
 
41
- useCSRF(api, {
39
+ useCSRF(client, {
42
40
  cookieName: "csrf_token",
43
41
  headerName: "X-CSRF-Token",
44
42
  });
45
43
 
46
- useUnauthorized(api, {
44
+ useUnauthorized(client, {
47
45
  loginPath: "/login",
48
46
  });
49
47
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fgrzl/fetch",
3
- "version": "0.1.0-alpha.26",
3
+ "version": "0.1.0-alpha.27",
4
4
  "description": "A simple fetch client",
5
5
  "keywords": [
6
6
  "fetch",