Sha256: cdef56cdca82430fbb8ad6c49848621acb442d9d1e1843ae0609dd0660cc9081
Contents?: true
Size: 423 Bytes
Versions: 22
Compression:
Stored size: 423 Bytes
Contents
import axios from 'axios' import applyCaseMiddleware from 'axios-case-converter' import { validate as isUuid } from 'uuid' const csrfToken = (document?.querySelector("meta[name=csrf-token]") as any)?.content axios.defaults.headers.common['X-CSRF-Token'] = csrfToken const restClient = applyCaseMiddleware(axios.create() as any, { preservedKeys: (key) => { return isUuid(key) } }) as any export default restClient
Version data entries
22 entries across 22 versions & 1 rubygems