Last active
March 30, 2025 05:05
-
-
Save marcobehlerjetbrains/3b9ed46953f810160e3a47e81f88e027 to your computer and use it in GitHub Desktop.
Spring Boot REF2 - Http Post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (async function createPhoto() { | |
| let photo = {"fileName": "hello.jpg"}; | |
| await fetch("http://localhost:8080/photoz", { | |
| method: "POST", | |
| headers: { | |
| "Accept": "application/json", | |
| "Content-Type": "application/json" | |
| }, | |
| body: JSON.stringify(photo) | |
| }) | |
| .then(result => result.text()) | |
| .then(text => alert(text)); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@CentreMetre yes usually error 405 indicates somewhere you have gone incorrect in Mapping annotations