I'm having an issue where when i try to navigate to a specific page inside CEF4Delphi, the page won't open, will keep blank.
But if i navigate to the same page with Chrome, it will show a HTTP ERROR 429.
How can i know in CEF4Delphi, that a HTTP 429 is returned ? Looks like CEF4Delphi won't show the http error code, like Chrome does.
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.
How to get HTTP response code ?
- salvadordf
- Posts: 4580
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to get HTTP response code ?
Hi,
The TChromium.OnLoadError event should be triggered and the "errorCode" parameter should have a -429 value.
Check that the TChromium.OnRenderProcessTerminated event is not triggered.
The TChromium.OnLoadError event should be triggered and the "errorCode" parameter should have a -429 value.
Check that the TChromium.OnRenderProcessTerminated event is not triggered.

-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Re: How to get HTTP response code ?
I tested with this simulation url :
http://httpstat.us/429
But somehow, the onLoadError event is not triggered
http://httpstat.us/429
But somehow, the onLoadError event is not triggered

Re: How to get HTTP response code ?
I also do not respond to this error in the onLoadError. But as an alternative solution, you can use the event OnLoadEnd, there is httpStatusCode and track any error code and display information to the user.
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Re: How to get HTTP response code ?
Thank you, this worked !Student wrote: Sat Oct 29, 2022 10:17 pm I also do not respond to this error in the onLoadError. But as an alternative solution, you can use the event OnLoadEnd, there is httpStatusCode and track any error code and display information to the user.

Re: How to get HTTP response code ?
Wouldn't it be more correct to check in ResourceLoadComplete, I always look at the download status of a particular link there.
Re: How to get HTTP response code ?
I think it depends on the need, if you want to check each resource then ResourceLoadComplete, if only loading the entire page then OnLoadEnd.dilfich wrote: Fri Nov 04, 2022 6:58 am Wouldn't it be more correct to check in ResourceLoadComplete, I always look at the download status of a particular link there.
Don't forget that ResourceLoadComplete is triggered on every resource load, if you have too many resources on your site, your code will be executed often and performance will go down.