package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:18080/api/workspaces/add"
payload := strings.NewReader("{\n \"path\": \"/data/spaces/my-space\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}