This repository has been archived on 2024-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
helse-sprik/next-frontend/pages/api/http.ts
Markus Johansen 177d6c7cd8 🏗️ Migrerer fra Next.js til Vite react
Co-authored-by: Øydis Kind Refsum <oydis.kind.refsum@nav.no>
Co-authored-by: Christian Bulow Skovborg <christian.bulow.skovborg@nav.no>
Co-authored-by: Amalie Mansåker <amalie.erdal.mansaker@nav.no>
Co-authored-by: Sindre Kjelsrud <sindre.kjelsrud@nav.no>
2023-07-19 14:53:13 +02:00

13 lines
No EOL
357 B
TypeScript

import axios from "axios";
export default function post(route: String, data?: Object) {
axios.post("https://helse-sprik.intern.dev.nav.no" + route, data, {
headers: {
'Content-Type': 'application/json'
}
}).then((response) => {
console.log(response)
}).catch((error) => {
console.log(error);
})
}