This commit is contained in:
Matheus Albino Brunhara
2022-05-28 12:54:11 -05:00
8 changed files with 418 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
import axios from "axios";
export class ApiClient{
private static api = axios.create({
baseURL: "http://localhost:8080"
});
public static async doPost (url: string, body: any): Promise<any> {
return await this.api
.post(url, body)
.then(res => {
console.log(res.data);
})
.catch(error => {
console.log(error);
});
};
}