Skip to content

[example] Add Request Deduplication demo to Browser example #30

Description

@AryanSharma48

Problem

The browser example currently demonstrates SmoothAPI functionality through
interactive buttons, including retry and circuit breaker behavior.

Request Deduplication is supported by SmoothAPI but does not currently
have an interactive browser demonstration.

What needs to be done

Add a new Request Deduplication demo to the browser example.

The demo should:

  1. Add a new button to the page
  2. Add a click handler
  3. Trigger multiple identical requests concurrently
  4. Display the results in the existing output area

Acceptance Criteria

  • A "Deduplication Demo" button is added
  • Clicking the button triggers concurrent requests
  • SmoothAPI request deduplication is enabled
  • Results are displayed in the existing output area
  • The example compiles successfully
  • Existing browser demos continue to work

Files to look at

  • examples/browser/index.html
  • examples/browser/main.ts

Prerequisites

Basic HTML and JavaScript/TypeScript.

Notes

Keep the UI consistent with the existing browser example.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions