Intercept specific Request/Response

Hi guys,

I'm trying to develop a plugin that intercept some specific requests, such as /some/api/request. My main goal is intercept the payload and the response of that request. I'm thinking about add these script in some hack.js file.
I take a brief look into KFetch, but it seems that is an alternative to $http, so it's no what I want...
Another thing that I've found on the Documentation it's the HttpInterceptor with the request and response methods.

But I don't know how to implement them... :sweat_smile:
Can you help me guys?

What version of Kibana are you targeting? Are you trying to capture request/responses in the client or the server?

Can you describe your use case? What is your plugin trying to do?

Starting in Kibana 7.9, all plugins have migrated over to the new kibana platform. In this new platform, Kfetch and $http have been replaced with http service which is provided to plugins via core parameter in the start method.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.