IRequest Interface (original) (raw)

Version 118.6.80

Class used to represent a web request. The methods of this class may be called on any thread.

Namespace: CefSharp
Assembly: CefSharp (in CefSharp.dll) Version: 118.6.80.0 (118.6.80.0)

Syntax

public interface IRequest : IDisposable

public interface class IRequest : IDisposable

The IRequest type exposes the following members.

Properties

| | Name | Description | | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Public property | Flags | Get/Set request flags, can be used to control caching policy | | Public propertyCode example | Headers | Header Collection - If dealing with headers that only contain a single value then it's easier to use SetHeaderByName(String, String, Boolean) or GetHeaderByName(String). You cannot modify the referrer using headers, use SetReferrer(String, ReferrerPolicy). NOTE: This collection is a copy of the underlying type, to make changes, take a reference to the collection, make your changes, then reassign the collection. | | Public property | Identifier | Returns the globally unique identifier for this request or 0 if not specified. Can be used by IRequestHandler implementations in the browser process to track a single request across multiple callbacks. | | Public property | IsDisposed | Gets a value indicating whether the request has been disposed of. | | Public property | IsReadOnly | Returns true if this object is read-only. | | Public property | Method | Request Method GET/POST etc | | Public property | PostData | Post data | | Public property | ReferrerPolicy | Get the referrer policy. | | Public property | ReferrerUrl | Get the referrer URL. | | Public property | ResourceType | Get the resource type for this request. | | Public property | TransitionType | Get the transition type for this request. Applies to requests that represent a main frame or sub-frame navigation. | | Public property | Url | Request Url |

Top

Methods

| | Name | Description | | | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Public method | Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.) | | Public method | GetHeaderByName | Returns the first header value for name or an empty string if not found. Will not return the Referer value if any. Use Headers instead if name might have multiple values. | | Public method | InitializePostData | Initialize a new instance of IPostData. Make sure to check if the PostData is null before calling otherwise the existing data will be overridden. | | Public method | SetHeaderByName | Set the header name to value. The Referer value cannot be set using this method. Use SetReferrer(String, ReferrerPolicy) instead. | | Public method | SetReferrer | Set the referrer URL and policy. If non-empty the referrer URL must be fully qualified with an HTTP or HTTPS scheme component. Any username, password or ref component will be removed. | | Public method | UnWrap | Used internally to get the underlying IRequest instance. Unlikely you'll use this yourself. |

Top

Extension Methods

See Also

Reference