Kirix Support Forums

Handling URI requests

Please post all general questions, comments, bug reports, and any other wxWebConnect feedback here.

Handling URI requests

Postby glenflet on Fri Feb 25, 2011 2:47 am

Is it possible to handle all URI requests in my application, so I just send a stream and minetype.
NOTE: I also need to catch request as a result of sources loaded a HTML page such as style sheets, and images.
Registered User
Posts: 1
Joined: Fri Feb 25, 2011 2:39 am

Re: Handling URI requests

Postby jonmmorgan on Fri Feb 25, 2011 7:02 am

Sounds like you might need a protocol handler (see viewtopic.php?f=25&t=817 for some discussion). With a protocol handler, you can catch all requests to that protocol (e.g. myapp://, and then can return any content for that page and any content type that you like.

Another possibility is to hook into the OpenURI event, veto it to prevent it actually opening the URI, and then do some processing based on the URI that was opened. This of course only applies to the main page, not the stylesheets, etc. that you load from that page, so if you want control of them too you will probably need a protocol handler, and then put in references to myapp://styles/fancystyle.css or whatever you want.
Registered User
Posts: 94
Joined: Fri May 14, 2010 9:48 am

Return to wxWebConnect Questions, Thoughts & Feedback