Closed liesauer closed 3 years ago
i am trying to craete a hybrid framework, and i want to intercept all the requests sent by the website, and modify the response if i need/want, i already implemented partial functions of this feature by creating a custom SchemeHandlerFactory
and SchemeHandler
, but currently the response is completely new by myself. now i have no idea about how to intercept the original response and modify it then return to the wesite, let's say i just want to replace all the hello
words into helo
or decrypt the images(was encrypted by the server) then return it to the website so can display the images properly.
It may not be that easy for someone else to clearly understand that. Are you requesting data from an external website? If yes, where in Chromely are you doing that? Via a Controller action or you are talking directly to the website bypassing Chromely?
@liesauer If you are creating the Controllers yourself, I won't see the need for intercepting the request to change the response. Just return the responses you want.
But if it is a third-party Controller class, then I will suggest creating a custom RequestTaskHandler and register it.. https://github.com/chromelyapps/Chromely/blob/94aeae7ffa621558c96ee4ee965c3bc65ba8f7cf/src/Chromely.Core/Defaults/DefaultRequestTaskRunner.cs#L49