Skip to content

Add accessible 'Copy as cURL' button#326

Merged
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
1nonlypiece:feat/issue-284
Jun 29, 2026
Merged

Add accessible 'Copy as cURL' button#326
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
1nonlypiece:feat/issue-284

Conversation

@1nonlypiece

Copy link
Copy Markdown
Contributor

Adds a one-click "Copy as cURL" action that serialises a request into a ready-to-run curl command with clear success feedback.

  • New utils/toCurl.ts: pure, shell-safe serializer (single-quotes values, escapes embedded quotes, JSON-stringifies object bodies, omits bodies for GET/HEAD).
  • New CopyCurlButton component: real button, clipboard API with execCommand fallback, success/failure state, and an aria-live announcement.
  • 8 focused vitest cases across the util and component.

Closes #284

@greatest0fallt1me greatest0fallt1me merged commit 7705f43 into CalloraOrg:main Jun 29, 2026
@grantfox-oss grantfox-oss Bot mentioned this pull request Jun 29, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add accessible 'Copy as cURL' button

2 participants