Qt 5.11 | Qt WebEngine | C++ Classes | QWebEngineUrlRequestInterceptor

Qt 5.11.3 Reference Documentation

# QWebEngineUrlRequestInterceptor Class

The QWebEngineUrlRequestInterceptor class provides an abstract base class for URL interception. More...

Header: | #include <QWebEngineUrlRequestInterceptor>
Since: | Qt 5.6

- List of all members, including inherited members

## Public Functions

| QWebEngineUrlRequestInterceptor(QObject *p = Q_NULLPTR)
virtual void | interceptRequest(QWebEngineUrlRequestInfo &info) = 0

## Detailed Description

The QWebEngineUrlRequestInterceptor class provides an abstract base class for URL interception.

Implementing the QWebEngineUrlRequestInterceptor interface and installing the interceptor on the profile enables intercepting, blocking, and modifying URL requests before they reach the networking stack of Chromium.

You can install the interceptor on a profile via QWebEngineProfile::setRequestInterceptor() or QQuickWebEngineProfile::setRequestInterceptor().

When using the Qt WebEngine Widgets Module, QWebEnginePage::acceptNavigationRequest() offers further options to accept or block requests.

See also interceptRequest() and QWebEngineUrlRequestInfo.

## Member Function Documentation

### QWebEngineUrlRequestInterceptor::QWebEngineUrlRequestInterceptor(QObject *p = Q_NULLPTR)

Default constructs an instance of QWebEngineUrlRequestInterceptor.

### `[pure virtual]` void QWebEngineUrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)