npm install @readyapi/api-client
<script setup>
import { ApiClient } from '@readyapi/api-client'
</script>
<template>
<ApiClient />
</template>
Pass an URL of a request proxy to avoid CORS issues.
You can use useRequestStore()
to interact with the API client.
const { readOnly } = useRequestStore()
readOnly.value = false
const { activeRequest } = useRequestStore()
console.log(activeRequest)
const { setActiveRequest } = useRequestStore()
setActiveRequest({
url: 'https://echo.scalar.com'
type: 'GET,
path: '/foobar'
})