Esempio n. 1
0
func (m *testMw) ProcessClientResponse(rsp mercury.Response, ctx context.Context) mercury.Response {
	rsp.SetHeader("X-Boop", "Boop")
	return rsp
}
Esempio n. 2
0
func (m *testMw) ProcessClientResponse(rsp mercury.Response, req mercury.Request) mercury.Response {
	rsp.SetHeader("X-Boop", "Boop")
	return rsp
}
Esempio n. 3
0
func (m requestTreeMiddleware) ProcessServerResponse(rsp mercury.Response, ctx context.Context) mercury.Response {
	if v, ok := ctx.Value(parentIdCtxKey).(string); ok && v != "" && rsp != nil {
		rsp.SetHeader(parentIdHeader, v)
	}
	return rsp
}