README
@advsol/axios
This package will handle authentication for all your HTTP requests to the iMIS API from client-side based iParts, automatically adding on the RequestVerificationToken, from the DOM and correctly setting the path for your HTTP requests.
Install
npm i @advsol/axios
Use
Add asiAxios
to your imports
. This will provide the Axios HTTP client with the interceptor configured;
with the asiAxios
object you can perform your requests.
import asiAxios from '@advsol/axios'
asiAxios.get('api/Party?id=113')
.then(response => {
//logic goes here
})
.catch(error => console.error(error));
The sample project here shows how to use this package.