1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-14 06:12:33 +00:00

add yaml support

This commit is contained in:
Daishan Peng
2018-05-24 10:28:05 -07:00
committed by Darren Shepherd
parent 79b91ea33c
commit 59c4a298e8
7 changed files with 80 additions and 20 deletions

View File

@@ -85,7 +85,10 @@ func handler(apiContext *types.APIContext) error {
close(events)
}()
jsonWriter := writer.JSONResponseWriter{}
jsonWriter := writer.EncodingResponseWriter{
ContentType: "application/json",
Encoder: types.JSONEncoder,
}
t := time.NewTicker(5 * time.Second)
defer t.Stop()