Scalar API Client
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'
})