Skip to content

Instantly share code, notes, and snippets.

View arunpkumar92's full-sized avatar

Arun Prasanna Kumar arunpkumar92

  • Flip Media Pvt LTD
  • Trivandrum, Kerala INDIA
View GitHub Profile
@paulsturgess
paulsturgess / service.js
Last active August 8, 2024 04:25
An example Service class wrapper for Axios
import axios from 'axios';
class Service {
constructor() {
let service = axios.create({
headers: {csrf: 'token'}
});
service.interceptors.response.use(this.handleSuccess, this.handleError);
this.service = service;
}