JSPM

@scalar/api-client

0.7.20
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 78991
  • Score
    100M100P100Q154358F
  • License MIT

the open source API testing client

Package Exports

  • @scalar/api-client

Readme

Scalar API Client

Version Downloads License Discord

Installation

npm install @scalar/api-client

Usage

<script setup>
import { ApiClient } from '@scalar/api-client'
</script>

<template>
  <ApiClient />
</template>

Props

proxyUrl?: string

Pass an URL of a request proxy to avoid CORS issues.

Composable

You can use useApiClientRequestStore() to interact with the API client.

readOnly

const { readOnly } = useApiClientRequestStore()

readOnly.value = false

activeRequest

const { activeRequest } = useApiClientRequestStore()

console.log(activeRequest)

setActiveRequest

const { setActiveRequest } = useApiClientRequestStore()

setActiveRequest({
  url: 'https://echo.scalar.com'
  type: 'GET,
  path: '/foobar'
})