Skip to content

Snippets

HarborClient snippet bundles are installable packages of reusable JavaScript for pre-request and post-request script lists. See Using snippets in the app for installation and management.

Catalog updated 7/21/2026.

Auth

Install

Version
1.0.4
Publisher
HarborClient
Categories
Testing
Included snippets
  • ID Token (Post-request · Main)
Repository
https://github.com/harborclient/snippet-auth (v1.0.4)
Min HarborClient version
>=2.0.0

Snippet for authentication.

Snippet for authentication.

See https://harborclient-blog.com/2026/07/06/capture-auth-tokens-with-post-request-scripts-in-harborclient/

Development

pnpm install

Sign the bundle directory with an Ed25519 key:

export HARBORCLIENT_PLUGIN_SIGNING_KEY=/path/to/signing.pem
pnpm sign

Publish a new version (bumps snippets.json, signs, commits, tags, and pushes):

pnpm release
pnpm release -- --version minor

See the @harborclient/sdk signing docs for key generation and signature.json format.

Testing

Install

Version
1.0.6
Publisher
HarborClient
Categories
Testing
Included snippets
  • Pass (Post-request · Main)
  • Fail (Post-request · Main)
Repository
https://github.com/harborclient/snippet-testing (v1.0.6)
Min HarborClient version
>=2.0.0

A complete set of pass and fail testing snippets.

HarborClient snippet bundle with pass and fail post-request tests.

Snippets

Both snippets run in post-request script lists (collection or request PostRequest tab).

Snippet Purpose
Pass Asserts a successful response. Use against endpoints that are meant to succeed.
Fail Asserts a error response (expects 400). Use against endpoints meant to fail.

Install

Requires HarborClient 2.0.0 or later.

  1. Open File → Snippets.
  2. Browse the Marketplace tab and install Testing, or use Install with this repository URL: https://github.com/harborclient/snippet-testing
  3. Installed snippets appear under Settings → Snippets and can be referenced from any post-request script list via Select snippet....

See Testing and Request scripts — Snippets in the HarborClient docs for more on writing and using tests.

Development

pnpm install

Sign the bundle directory with an Ed25519 key:

export HARBORCLIENT_PLUGIN_SIGNING_KEY=/path/to/signing.pem
pnpm sign

Publish a new version (bumps snippets.json, signs, commits, tags, and pushes):

pnpm release
pnpm release -- --version minor

See the @harborclient/sdk signing docs for key generation and signature.json format.

Submit your snippet bundle

Host your snippet bundle in a public GitHub repository with a snippets.json manifest at the repo root, then open a pull request that adds an entry to plugins/catalog.json under the snippets array. See Publish to the marketplace for the required fields and review process.