🏗️ 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>
This commit is contained in:
parent
aafa3cf243
commit
177d6c7cd8
40 changed files with 4738 additions and 2502 deletions
13
next-frontend/pages/api/http.ts
Normal file
13
next-frontend/pages/api/http.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
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);
|
||||
})
|
||||
}
|
Reference in a new issue