http.js 366 Bytes
Newer Older
zhanghaozhe committed
1 2 3
import axios from "axios";
import qs from 'qs'

wangshuo committed
4
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
xuzhenghua committed
5
axios.defaults.withCredentials = true
wangshuo committed
6

zhanghaozhe committed
7 8 9 10 11 12
const instance = axios.create({
    transformRequest: [
        (data) => qs.stringify(data)
    ],
    headers: {
        HTTP_PLAT_FORM: 5,
wangshuo committed
13
        HTTP_PLAT: 5,
zhanghaozhe committed
14 15 16
    }
})
export default instance