diff options
Diffstat (limited to 'handlers.go')
-rw-r--r-- | handlers.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/handlers.go b/handlers.go index 3998228..a44c9d8 100644 --- a/handlers.go +++ b/handlers.go @@ -64,6 +64,20 @@ func apiEndpointHandler(w http.ResponseWriter, r *http.Request) { } +// handles POST for "/api/plain/users" +func apiEndpointPOSTHandler(w http.ResponseWriter, r *http.Request) { + vars := mux.Vars(r) + format := vars["format"] + endpoint := vars["endpoint"] + + w.Header().Set("Content-Type", htmlutf8) + n, err := w.Write([]byte(format + "/" + endpoint)) + if err != nil || n == 0 { + log.Printf("Error writing to HTTP stream: %v\n", err) + } + +} + // handles "/api/plain/tags" func apiTagsBaseHandler(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) |