Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Undeclared identifier: 'IStream'

Post Reply
bullsito
Posts: 32
Joined: Sun Dec 13, 2020 4:19 pm

Undeclared identifier: 'IStream'

Post 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.
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Undeclared identifier: 'IStream'

Post 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.
bullsito
Posts: 32
Joined: Sun Dec 13, 2020 4:19 pm

Re: Undeclared identifier: 'IStream'

Post by bullsito »

Thank you i check out
bullsito
Posts: 32
Joined: Sun Dec 13, 2020 4:19 pm

Re: Undeclared identifier: 'IStream'

Post 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.
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Undeclared identifier: 'IStream'

Post 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.
bullsito
Posts: 32
Joined: Sun Dec 13, 2020 4:19 pm

Re: Undeclared identifier: 'IStream'

Post 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.
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Undeclared identifier: 'IStream'

Post 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.
bullsito
Posts: 32
Joined: Sun Dec 13, 2020 4:19 pm

Re: Undeclared identifier: 'IStream'

Post by bullsito »

I am talking about cef4-edge Webview component not chrome.
there is not demo like this.in folder
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Undeclared identifier: 'IStream'

Post 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.
Post Reply