Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung | |
| de:modul:ffit:3-jahr:java:learningunits:lu09:aufgaben:a02 [2025/11/04 03:05] – apeter | de:modul:ffit:3-jahr:java:learningunits:lu09:aufgaben:a02 [2025/11/04 03:15] (aktuell) – apeter |
|---|
| </code> | </code> |
| |
| | Zukünftig soll jedoch das Frontend https://alexanderpeter.github.io/ffit-lu08-club-accounting-website/ die API ansprechen können. |
| |
| Mit dem Cherry-Pick ''ff10bf8'' erhalten Sie die Klasse ''WebConfig.java'' mit den CORS-Einstellung und einer Weiterleitung von HTTP auf HTTPS. | Mit dem Cherry-Pick ''ff10bf8'' erhalten Sie die Klasse ''WebConfig.java'' mit den CORS-Einstellung und einer Weiterleitung von HTTP auf HTTPS. |
| </code> | </code> |
| |
| | Danach ist die API sowohl unter http://localhost:8080/api/hello als auch unter https://localhost:8443/api/hello verfügbar. |
| |
| | Ebenfalls sind die cURLs mit HTTPS verfügbar. |
| |
| https://localhost:8443/api/hello | <code bash> |
| | curl -k -X POST "https://localhost:8443/projects" -H "Content-Type: application/json" -d '{"project_name":"Hobby_Horsing_Horgen","password":"geheim123"}' |
| |
| | curl -k -X POST "https://localhost:8443/login" -H "Content-Type: application/json" -d '{"project_name":"Hobby_Horsing_Horgen","password":"geheim123"}' |
| |
| | ... |
| | </code> |
| |
| | Und zu guter Letzt kann das Frontend https://alexanderpeter.github.io/ffit-lu08-club-accounting-website/ nun auf Ihre lokale API zugreifen: |
| | Happy Testing! |
| |
| |