export function axios(
  url: string,
  config: {
    method: string;
    params: any;
  }
): Promise<any> {
  return fetch(url, {
    method: config.method,
    body: JSON.stringify(config.params),
    headers: {
      "Content-Type": "application/json",
    },
  }).then((ret) => {
    return ret.json();
  });
}
