about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/rest-api/cmd/main.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rest-api/cmd/main.go b/src/rest-api/cmd/main.go
index bfeb752..af72f82 100644
--- a/src/rest-api/cmd/main.go
+++ b/src/rest-api/cmd/main.go
@@ -6,9 +6,11 @@ import (
 )
 
 func main() {
-  http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
-  fmt.Fprint(w, "Hello, World!")
- })
+	http.HandleFunc("/", handleRequest)
 
-  http.ListenAndServe(":8080", nil)
+	http.ListenAndServe(":8080", nil)
+}
+
+func handleRequest(w http.ResponseWriter, r *http.Request) {
+	fmt.Fprint(w, "Hello, World!", r.Body)
 }