wasmcloud/cmd/wasmcloudd/api.go

12 lines
205 B
Go
Raw Normal View History

2019-12-08 14:27:42 +00:00
package main
import (
"encoding/json"
"net/http"
)
func apiWhoami(w http.ResponseWriter, r *http.Request, u *User) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(u)
}