mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
rest: specify content-type
Signed-off-by: FUJITA Tomonori <[email protected]>
This commit is contained in:
committed by
FUJITA Tomonori
parent
bcf508cb56
commit
40819efb0c
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user