Skip to content

Guides

TBD: we might write guides like this?

  1. Define a helper method a typescript or javascript

    collections/example/helper.ts
    export async function authFor(env: string) {
    return `auth-for-${env}`;
    }
  2. import the helper method and call it.

    collections/example/products.https
    import:
    ./helper.ts:
    - authFor
    >>>
    POST https://example.com/products
    Authorization: {{ @auth = authFor(env) }}