function CommonAPI(url, getAPIFn, header) {
this.url = url;
this.header = header;
this[getAPIFn] = async (data) => {
var result = await axios({
url: this.url,
method: "post",
data: data,
headers: this.header
}).then((res) => {
return (res.data)
}).catch(req => {
throw req
})
return result
}
}