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

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

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