Chromium Embedded Framework (CEF)  110.0.7+gba12a2e+chromium-110.0.5481.23
CefURLRequest Class Referenceabstract

Class used to make a URL request. More...

#include "include/cef_urlrequest.h"

Inheritance diagram for CefURLRequest:
CefBaseRefCounted

Public Types

typedef cef_urlrequest_status_t Status
 
typedef cef_errorcode_t ErrorCode
 

Public Member Functions

virtual CefRefPtr< CefRequestGetRequest ()=0
 Returns the request object used to create this URL request. More...
 
virtual CefRefPtr< CefURLRequestClientGetClient ()=0
 Returns the client. More...
 
virtual Status GetRequestStatus ()=0
 Returns the request status. More...
 
virtual ErrorCode GetRequestError ()=0
 Returns the request error if status is UR_CANCELED or UR_FAILED, or 0 otherwise. More...
 
virtual CefRefPtr< CefResponseGetResponse ()=0
 Returns the response, or NULL if no response information is available. More...
 
virtual bool ResponseWasCached ()=0
 Returns true if the response body was served from the cache. More...
 
virtual void Cancel ()=0
 Cancel the request. More...
 
- Public Member Functions inherited from CefBaseRefCounted
virtual void AddRef () const =0
 Called to increment the reference count for the object. More...
 
virtual bool Release () const =0
 Called to decrement the reference count for the object. More...
 
virtual bool HasOneRef () const =0
 Returns true if the reference count is 1. More...
 
virtual bool HasAtLeastOneRef () const =0
 Returns true if the reference count is at least 1. More...
 

Static Public Member Functions

static CefRefPtr< CefURLRequestCreate (CefRefPtr< CefRequest > request, CefRefPtr< CefURLRequestClient > client, CefRefPtr< CefRequestContext > request_context)
 Create a new URL request that is not associated with a specific browser or frame. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CefBaseRefCounted
virtual ~CefBaseRefCounted ()
 

Detailed Description

Class used to make a URL request.

URL requests are not associated with a browser instance so no CefClient callbacks will be executed. URL requests can be created on any valid CEF thread in either the browser or render process. Once created the methods of the URL request object must be accessed on the same thread that created it.

Member Typedef Documentation

◆ ErrorCode

◆ Status

Member Function Documentation

◆ Cancel()

virtual void CefURLRequest::Cancel ( )
pure virtual

Cancel the request.

◆ Create()

static CefRefPtr<CefURLRequest> CefURLRequest::Create ( CefRefPtr< CefRequest request,
CefRefPtr< CefURLRequestClient client,
CefRefPtr< CefRequestContext request_context 
)
static

Create a new URL request that is not associated with a specific browser or frame.

Use CefFrame::CreateURLRequest instead if you want the request to have this association, in which case it may be handled differently (see documentation on that method). A request created with this method may only originate from the browser process, and will behave as follows:

  • It may be intercepted by the client via CefResourceRequestHandler or CefSchemeHandlerFactory.
  • POST data may only contain only a single element of type PDE_TYPE_FILE or PDE_TYPE_BYTES.
  • If |request_context| is empty the global request context will be used.

The |request| object will be marked as read-only after calling this method.

◆ GetClient()

virtual CefRefPtr<CefURLRequestClient> CefURLRequest::GetClient ( )
pure virtual

Returns the client.

◆ GetRequest()

virtual CefRefPtr<CefRequest> CefURLRequest::GetRequest ( )
pure virtual

Returns the request object used to create this URL request.

The returned object is read-only and should not be modified.

◆ GetRequestError()

virtual ErrorCode CefURLRequest::GetRequestError ( )
pure virtual

Returns the request error if status is UR_CANCELED or UR_FAILED, or 0 otherwise.

◆ GetRequestStatus()

virtual Status CefURLRequest::GetRequestStatus ( )
pure virtual

Returns the request status.

◆ GetResponse()

virtual CefRefPtr<CefResponse> CefURLRequest::GetResponse ( )
pure virtual

Returns the response, or NULL if no response information is available.

Response information will only be available after the upload has completed. The returned object is read-only and should not be modified.

◆ ResponseWasCached()

virtual bool CefURLRequest::ResponseWasCached ( )
pure virtual

Returns true if the response body was served from the cache.

This includes responses for which revalidation was required.


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