Skip to content

Instantly share code, notes, and snippets.

@marcobehlerjetbrains
marcobehlerjetbrains / springboot_ref2_http_post
Last active April 29, 2024 04:55
Spring Boot REF2 - Http Post
(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)
@marcobehlerjetbrains
marcobehlerjetbrains / springboot_ref1_http_delete.js
Created March 23, 2022 10:14
Spring Boot REF1 - Http Delete
(async function deletePhoto(id) {
await fetch("http://localhost:8080/photoz/" + id, {
method: "DELETE"
})
})("5")
@marcobehlerjetbrains
marcobehlerjetbrains / springboot_ref3_upload.html
Created March 23, 2022 10:09
Spring Boot REF3 - upload.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h2>Photo Upload</h2>