(token: string = DEFAULT_TOKEN)
| 51 | |
| 52 | /** An `Authorization: Bearer <token>` header bag, for spreading into `headers`. */ |
| 53 | export function authHeaders(token: string = DEFAULT_TOKEN): { Authorization: string } { |
| 54 | return { Authorization: `Bearer ${token}` }; |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Merge `Authorization: Bearer <token>` into a `fetch` `RequestInit`, preserving |
no outgoing calls