💥 Poste innmeldte feil til backend

Co-authored-by: Sindre Kjelsrud <sindre.kjelsrud@nav.no>
Co-authored-by: Amalie Mansåker <amalie.erdal.mansaker@nav.no>
This commit is contained in:
Markus Johansen 2023-07-05 14:17:57 +02:00
parent e49bce0470
commit 4ad4ce0a75
5 changed files with 59 additions and 21 deletions

View file

@ -0,0 +1,13 @@
import axios from "axios";
export default function post(route: String, data?: Object) {
axios.post("http://0.0.0.0:8080/" + route, data, {
headers: {
'Content-Type': 'application/json'
}
}).then((response) => {
console.log(response)
}).catch((error) => {
console.log(error);
})
}