Per collection/folder auth

This commit is contained in:
Torbjörn Molin committed 2026-10-19 12:38:38 +02:00
1 parent d5e7b484fc
commit 47ee07d9ff
16 files changed
+1569 -58

No files matched your search

+15 -2
View File
@@ -75,6 +75,17 @@ Other things worth knowing:
form stay in sync.
- The **Auth** tab is a helper that writes the `Authorization` header. Basic
auth is written as `Basic user password` and encoded when sent, like JetBrains.
- **Folder auth:** right-click a folder → *Folder auth…* (or a collection →
*Default auth…*) to set auth that every request below it uses when it has no
`Authorization` header of its own. The nearest folder wins; a folder can also
say *None* to stop inheritance. In a request's Auth tab, *Inherit* (no
header) uses it and *None* opts out with `# @no-auth`. It is stored in
`<folder>/.reqlite/folder.json` as `{ "auth": "Bearer {{token}}" }`
(`null` = none); other `.http` tools ignore it. The CLI applies it too.
- **Consolidate auth…** (same menus) removes `Authorization` headers that match
what the request would inherit. If the folder has no auth yet, it offers the
most used header as the folder's auth, and can pin requests that would
otherwise change (they get their current header, or `# @no-auth`).
- Cookies are kept in memory per collection (**View → Cookies**);
`# @no-cookie-jar` skips them for one request.
- **View → History** lists sent requests; *Open* restores one into a new tab.
@@ -117,7 +128,8 @@ on:
- `multipart/form-data` bodies with a boundary, parts may be `< ./file`.
- Directives: `# @name`, `# @no-redirect`, `# @no-cookie-jar`, `# @no-log`,
`# @timeout 30` / `500 ms`, `# @connection-timeout`. `# @insecure` is a
reqlite extension written by curl import for `-k`.
reqlite extension written by curl import for `-k`; `# @no-auth` is one that
skips folder auth.
- `#` and `//` comments.
Anything else (unknown directives, response handlers `> {% … %}` and
@@ -136,7 +148,8 @@ reqlite import postman <collection.json> <out-dir> [--env env.json]…
Without `--name`, `run` sends every request in the file in order, sharing one
cookie jar. Env files are taken from the nearest folder at or above the
`.http` file.
`.http` file. Folder auth is looked up from the file's folder upwards, up to
the folder with the env files (or the git root).
## Code layout