{"size": 529, "ext": "js", "max_stars_repo_path": "react-course/http--01-starting-setup/src/axios.js", "max_stars_repo_name": "gentilijuanmanuel/react-getting-started", "max_stars_repo_stars_event_min_datetime": "2019-03-09T16:08:43.000Z", "max_stars_repo_stars_event_max_datetime": "2019-03-09T16:08:43.000Z", "max_issues_repo_path": "react-course/http--01-starting-setup/src/axios.js", "max_issues_repo_name": "gentilijuanmanuel/react-getting-started", "max_issues_repo_issues_event_min_datetime": "2019-05-08T01:35:34.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-08T23:30:22.000Z", "max_forks_repo_path": "react-course/http--01-starting-setup/src/axios.js", "max_forks_repo_name": "gentilijuanmanuel/react-getting-started", "max_forks_repo_forks_event_min_datetime": "2019-07-05T15:04:32.000Z", "max_forks_repo_forks_event_max_datetime": "2019-07-05T15:04:32.000Z"}
{"max_stars_count": 1, "max_issues_count": 45, "max_forks_count": 1, "avg_line_length": 21.16, "max_line_length": 56, "alphanum_fraction": 0.7051039698}
import axios from 'axios';

const instance = axios.create({
  baseURL: 'https://jsonplaceholder.typicode.com'
});

instance.interceptors.request.use(request => {
  console.log(request);
  // Here you can edit the request, adding headers, etc.
  return request;
}, error => {
  console.error(error);
  return Promise.reject(error);
});

instance.interceptors.response.use(response => {
  console.log(response);
  return response;
}, error => {
  console.error(error);
  return Promise.reject(error);
});

export default instance;
