Esempio n. 1
0
func completeTheResponse(r *gorest.ResponseBuilder, code int, msgBody string) *gorest.ResponseBuilder {
	r.SetResponseCode(code)
	if msgBody != "" {
		r.WriteAndOveride([]byte(msgBody))
	}
	return r
}
Esempio n. 2
0
func updateResponse(r *gorest.ResponseBuilder, method string) *gorest.ResponseBuilder {
	r.ConnectionKeepAlive()
	r.AddHeader("X-Orchestrate-Req-Id", reqIdString())
	if method != "delete" {
		r.SetContentType("application/json")
	}
	return r
}