💥 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

@ -11,23 +11,6 @@ export default function Home() {
const {data, error, isLoading} = useSWR('http://0.0.0.0:8080/', fetcher);
console.log(data);
function post() {
axios.post("http://0.0.0.0:8080/test", {
ord: "heisann hoppsann",
tall: 7
}, {
headers: {
'Content-Type': 'application/json'
}
}).then( (response) => {
console.log(response)
}).catch( (error) => {
console.log(error);
})
}
post()
return (
<main className="flex justify-center">
<div className="w-1/2 flex flex-col gap-4 justify-center text-center">