Novel Preposterous Mockery

    @nextcloud/axios
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    @nextcloud/axios

    Build Status npm

    Simple, typed wrapper of an Axios instance for Nextcloud that automatically sends authentication headers. Cancellation is supported as well.

    Installation

    npm install @nextcloud/axios --save
    yarn add @nextcloud/axios

    Usage

    import axios from '@nextcloud/axios'
    
    axios.get('nextcloud.com')

    See https://github.com/axios/axios for details.

    Defining baseURL

    You are able to define baseURL to simplify the usage of axios across your app.

    import axios from '@nextcloud/axios'
    import { generateUrl } from '@nextcloud/router'
    
    const baseURL = generateUrl('/apps/your_app_id/api')
    
    axios.defaults.baseURL = baseURL

    References

    Install

    npm i @nextcloud/axios

    DownloadsWeekly Downloads

    16,315

    Version

    2.0.0

    License

    GPL-3.0

    Unpacked Size

    41.4 kB

    Total Files

    8

    Last publish

    Collaborators

    • gretadoci
    • mejo-
    • artonge
    • max-nextcloud
    • st3iny
    • marcoambrosinii
    • icewind1991
    • skjnldsv
    • christophwurst
    • juliushaertl
    • nickvergessen