PluginProbe
Extendify / 1.9.3
Extendify v1.9.3
3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 0.7.0 All 126 releases
extendify / src / Chat / api / axios.js

axios.js in Extendify 1.9.3, at src/Chat/api/axios.js

24 lines 533 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import axios from 'axios'
2
3 export const restApi = window.extChatData.root
4 export const wpHeaders = {
5 'Content-Type': 'application/json',
6 'X-WP-Nonce': window.extChatData.nonce,
7 'X-Requested-With': 'XMLHttpRequest',
8 'X-Extendify-Chat': true,
9 'X-Extendify': true,
10 }
11
12 const Axios = axios.create({
13 baseURL: restApi,
14 headers: wpHeaders,
15 })
16
17 Axios.interceptors.response.use((response) =>
18 Object.prototype.hasOwnProperty.call(response, 'data')
19 ? response.data
20 : response,
21 )
22
23 export { Axios }
24