Skip to content
axios / 2.0.0

axios 2.0.0

Install from the command line:
Learn more about npm packages
$ npm install @nextcloud/axios@2.0.0
Install via package.json:
"@nextcloud/axios": "2.0.0"

About this version

@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

Details


Assets

  • axios-2.0.0-npm.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all