diff options
author | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2014-12-25 20:24:13 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-25 03:58:11 -0800 |
commit | 40819efb0c592d8a23da8bec0006014b43321ac4 (patch) | |
tree | 78a21d0016c0609c67cdd7982ef46d02434c0cd8 | |
parent | bcf508cb5652d7cf1d3af86d5c903815ac4779bd (diff) |
rest: specify content-type
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | api/rest.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/api/rest.go b/api/rest.go index a110019e..909fd541 100644 --- a/api/rest.go +++ b/api/rest.go @@ -195,6 +195,7 @@ func (rs *RestServer) Neighbor(w http.ResponseWriter, r *http.Request) { http.Error(w, errStr, http.StatusInternalServerError) return } + w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Write(jns) } @@ -224,6 +225,7 @@ func (rs *RestServer) NeighborLocalRib(w http.ResponseWriter, r *http.Request) { } res := resInf.(*RestResponseDefault) + w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Write(res.Data) } |