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/frontend/pages/api/http.ts
Markus Johansen 0344e3cc0e 🚚 Https over http i post route for å unngå konflikt med backend
Co-authored-by: Sindre Kjelsrud <sindre.kjelsrud@nav.no>
Co-authored-by: Amalie Mansåker <amalie.erdal.mansaker@nav.no>
2023-07-17 16:18:39 +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);
})
}