axios
This commit is contained in:
18
src/config/axios.js
Normal file
18
src/config/axios.js
Normal file
@ -0,0 +1,18 @@
|
||||
import axios from 'axios';
|
||||
|
||||
const instance = axios.create({
|
||||
baseURL: 'https://api.telkomcel.tl/stag-tpay-dash-api/',
|
||||
headers: {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"content-type":"application/json",
|
||||
},
|
||||
})
|
||||
|
||||
export async function fetchApi(path, method, data) {
|
||||
let response = await instance({
|
||||
method: method,
|
||||
url: path,
|
||||
data: data
|
||||
});
|
||||
return response
|
||||
}
|
||||
Reference in New Issue
Block a user