Page 1 of 1

Undeclared identifier: 'IStream'

Posted: Thu Mar 24, 2022 1:57 pm
by bullsito
Delphi 11

I am trying to get the response body and modify it on cef4edge broswer
No luck
can any one give an example?

Thank you.

Re: Undeclared identifier: 'IStream'

Posted: Sat Mar 26, 2022 9:56 am
by salvadordf
Hi,

If you mean that you would like to intercept the response body to modify it before it's processed then WebView2 doesn't have any API to do that, so you can't use WebView4Delphi for that purpose.

In that case you have to use CEF4Delphi. Install it and run the ResponseFilterBrowser demo. That demo shows you how to intercept, modify or replace resources.

Re: Undeclared identifier: 'IStream'

Posted: Sat Mar 26, 2022 10:39 am
by bullsito
Thank you i check out

Re: Undeclared identifier: 'IStream'

Posted: Sat Mar 26, 2022 11:02 am
by bullsito
well The function Chromium1GetResourceResponseFilter is calling only once.
if i navigate to adiferent website then is not called.
any solution on this?

thank you.

Re: Undeclared identifier: 'IStream'

Posted: Tue Mar 29, 2022 7:25 am
by salvadordf
The filter works for network requests and not when the browser reads the resource content from the cache.

Read the code comments and the linked documents for more information.

Re: Undeclared identifier: 'IStream'

Posted: Thu Apr 07, 2022 8:16 am
by bullsito
No This is not the problem Url is always Different so is not cached.
What about get in text the response Body from a request is this possible?
Thanks any way.

Re: Undeclared identifier: 'IStream'

Posted: Thu Apr 07, 2022 10:29 am
by salvadordf
The URLRequest demo creates a custom request and it's able to get the response body.

I would also check if the PostInspectorBrowser demo shows the information you need.

Re: Undeclared identifier: 'IStream'

Posted: Thu Apr 07, 2022 11:55 am
by bullsito
I am talking about cef4-edge Webview component not chrome.
there is not demo like this.in folder

Re: Undeclared identifier: 'IStream'

Posted: Sat Apr 09, 2022 4:54 pm
by salvadordf
Try the NavigateWithWebResourceRequestBrowser demo in WebView4Delphi.
It's similar to the URLRequest in CEF4Delphi but I'm not sure this is what you need because the results are always processed by WebView2.