1.2.10 • Published 1 year ago

@readyapi/api-client v1.2.10

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Scalar API Client

Version Downloads License Discord

Installation

npm install @readyapi/api-client

Usage

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

<template>
  <ApiClient />
</template>

Props

proxyUrl?: string

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

Composable

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

readOnly

const { readOnly } = useRequestStore()

readOnly.value = false

activeRequest

const { activeRequest } = useRequestStore()

console.log(activeRequest)

setActiveRequest

const { setActiveRequest } = useRequestStore()

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