Molybden API
Loading...
Searching...
No Matches
molybden::NetworkDelegates Class Reference

A class that contains all network delegates. More...

#include <network_delegates.hpp>

Inheritance diagram for molybden::NetworkDelegates:
molybden::Network

Public Attributes

Delegate< BeforeSendUploadDataArgs, BeforeSendUploadDataActiononBeforeSendUploadData
 Invoked before the upload data is sent to the web server.
 
Delegate< CanSetCookieArgs, CanSetCookieActiononCanSetCookie
 Invoked to check if the given cookie can be set or not.
 
Delegate< CanGetCookiesArgs, CanGetCookiesActiononCanGetCookies
 Invoked to check if the engine can access the given cookie or not.
 
Delegate< CanAccessFileArgs, CanAccessFileActiononCanAccessFile
 Invoked to check if the engine can access a file on the local file system.
 
Delegate< ReceiveHeadersArgs, ReceiveHeadersActiononReceiveHeaders
 Invoked when the response headers have been received for a URL request.
 
Delegate< BeforeStartTransactionArgs, BeforeStartTransactionActiononBeforeStartTransaction
 Invoked before the network transaction starts.
 
Delegate< BeforeUrlRequestArgs, BeforeUrlRequestActiononBeforeUrlRequest
 Invoked when an HTTP request is about to occur.
 
Delegate< InterceptUrlRequestArgs, InterceptUrlRequestActiononInterceptUrlRequest
 Invoked when a URL request is about to be sent out.
 

Detailed Description

A class that contains all network delegates.

Member Data Documentation

◆ onBeforeSendUploadData

Delegate<BeforeSendUploadDataArgs, BeforeSendUploadDataAction> molybden::NetworkDelegates::onBeforeSendUploadData

Invoked before the upload data is sent to the web server.

It is the right place where you can override or set the required upload data.

Use the following approach to register a callback:

network->onBeforeSendUploadData = [](const BeforeSendUploadDataArgs& args, BeforeSendUploadDataAction action) {};
The NetworkDelegates::onBeforeSendUploadData action.
Definition network_delegates.hpp:52
The NetworkDelegates::onBeforeSendUploadData action arguments.
Definition network_delegates.hpp:27

In order to unregister the callback, use the reset() method:

network->onBeforeSendUploadData.reset();

◆ onBeforeStartTransaction

Delegate<BeforeStartTransactionArgs, BeforeStartTransactionAction> molybden::NetworkDelegates::onBeforeStartTransaction

Invoked before the network transaction starts.

It's the perfect place to override the HTTP headers before they are sent out.

Use the following approach to register a callback:

network->onBeforeStartTransaction = [](const BeforeStartTransactionArgs& args, BeforeStartTransactionAction action) {};
The NetworkDelegates::onBeforeStartTransaction action arguments.
Definition network_delegates.hpp:290
The NetworkDelegates::onBeforeStartTransaction arguments.
Definition network_delegates.hpp:269

In order to unregister the callback, use the reset() method:

network->onBeforeStartTransaction.reset();

◆ onBeforeUrlRequest

Delegate<BeforeUrlRequestArgs, BeforeUrlRequestAction> molybden::NetworkDelegates::onBeforeUrlRequest

Invoked when an HTTP request is about to occur.

Use the following approach to register a callback:

network->onBeforeUrlRequest = [](const BeforeUrlRequestArgs& args, BeforeUrlRequestAction action) {};
The NetworkDelegates::onBeforeUrlRequest action arguments.
Definition network_delegates.hpp:324
The NetworkDelegates::onBeforeUrlRequest arguments.
Definition network_delegates.hpp:309

In order to unregister the callback, use the reset() method:

network->onBeforeUrlRequest.reset();

◆ onCanAccessFile

Delegate<CanAccessFileArgs, CanAccessFileAction> molybden::NetworkDelegates::onCanAccessFile

Invoked to check if the engine can access a file on the local file system.

Use the following approach to register a callback:

network->onCanAccessFile = [](const CanAccessFileArgs& args, CanAccessFileAction action) {};
The NetworkDelegates::onCanAccessFile action.
Definition network_delegates.hpp:167
The NetworkDelegates::onCanAccessFile action arguments.
Definition network_delegates.hpp:149

In order to unregister the callback, use the reset() method:

network->onCanAccessFile.reset();

◆ onCanGetCookies

Delegate<CanGetCookiesArgs, CanGetCookiesAction> molybden::NetworkDelegates::onCanGetCookies

Invoked to check if the engine can access the given cookie or not.

Use the following approach to register a callback:

network->onCanGetCookies = [](const CanGetCookiesArgs& args, CanGetCookiesAction action) {};
The NetworkDelegates::onCanGetCookies action.
Definition network_delegates.hpp:130
The NetworkDelegates::onCanGetCookie action arguments.
Definition network_delegates.hpp:110

In order to unregister the callback, use the reset() method:

network->onCanGetCookies.reset();

◆ onCanSetCookie

Delegate<CanSetCookieArgs, CanSetCookieAction> molybden::NetworkDelegates::onCanSetCookie

Invoked to check if the given cookie can be set or not.

Use the following approach to register a callback:

network->onCanSetCookie = [](const CanSetCookieArgs& args, CanSetCookieAction action) {};

In order to unregister the callback, use the reset() method:

network->onCanSetCookie.reset();

◆ onInterceptUrlRequest

Delegate<InterceptUrlRequestArgs, InterceptUrlRequestAction> molybden::NetworkDelegates::onInterceptUrlRequest

Invoked when a URL request is about to be sent out.

Can be used to intercept a URL request and send a URL response as it was sent from a web server or let the engine decide how to process the URL request.

Use the following approach to register a callback:

network->onInterceptUrlRequest = [](const InterceptUrlRequestArgs& args, InterceptUrlRequestAction action) {};
The NetworkDelegates::onInterceptUrlRequest action arguments.
Definition network_delegates.hpp:379
The NetworkDelegates::onInterceptUrlRequest arguments.
Definition network_delegates.hpp:348

In order to unregister the callback, use the reset() method:

network->onInterceptUrlRequest.reset();

◆ onReceiveHeaders

Delegate<ReceiveHeadersArgs, ReceiveHeadersAction> molybden::NetworkDelegates::onReceiveHeaders

Invoked when the response headers have been received for a URL request.

It can be used to add, modify, or remove the HTTP headers received over the network.

Use the following approach to register a callback:

network->onReceiveHeaders = [](const ReceiveHeadersArgs& args, ReceiveHeadersAction action) {};
The NetworkDelegates::onReceiveHeaders action.
Definition network_delegates.hpp:250
The NetworkDelegates::onReceiveHeaders action arguments.
Definition network_delegates.hpp:186

In order to unregister the callback, use the reset() method:

network->onReceiveHeaders.reset();

The documentation for this class was generated from the following file: