Server : LiteSpeed
System : Linux server104.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64
User : saleoqej ( 6848)
PHP Version : 8.0.30
Disable Function : NONE
Directory :  /home/saleoqej/public_html/wp-content/plugins/extendify/src/Chat/api/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /home/saleoqej/public_html/wp-content/plugins/extendify/src/Chat/api/axios.js
import axios from 'axios';

export const restApi = window.extChatData.root;
export const wpHeaders = {
	'Content-Type': 'application/json',
	'X-WP-Nonce': window.extChatData.nonce,
	'X-Requested-With': 'XMLHttpRequest',
	'X-Extendify-Chat': true,
	'X-Extendify': true,
};

const Axios = axios.create({
	baseURL: restApi,
	headers: wpHeaders,
});

Axios.interceptors.response.use((response) =>
	Object.prototype.hasOwnProperty.call(response, 'data')
		? response.data
		: response,
);

export { Axios };