// Copyright © 2010-2017 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using CefSharp; using System; using System.Collections.Specialized; namespace CefSharp { /// /// Class used to represent a web request. The methods of this class may be called on any thread. /// public interface IRequest : IDisposable { /// /// Get/Set the Url to the first party for cookies used in combination with CefURLRequest. /// /// Note: If we every implment CefURLRequest then this will need to be added //string FirstPartyForCookies { get; set; } /// /// Get/Set request flags, can be used to control caching policy /// UrlRequestFlags Flags { get; set; } /// /// Request Url /// string Url { get; set; } /// /// Returns the globally unique identifier for this request or 0 if not specified. /// Can be used by implementations in the browser process to track a /// single request across multiple callbacks. /// ulong Identifier { get; } /// /// Request Method GET/POST etc /// string Method { get; set; } /// /// 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. /// /// the referrer url /// referrer policy void SetReferrer(string referrerUrl, ReferrerPolicy policy); /// /// Get the referrer URL. /// string ReferrerUrl { get; } /// /// Get the resource type for this request. /// ResourceType ResourceType { get; } /// /// Get the referrer policy. /// ReferrerPolicy ReferrerPolicy { get; } /// /// Header Collection /// 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. At some point this will be replaced with a proper wrapper. /// NameValueCollection Headers { get; set; } /// /// Post data /// IPostData PostData { get; } /// /// Get the transition type for this request. /// Applies to requests that represent a main frame or sub-frame navigation. /// TransitionType TransitionType { get; } /// /// Gets a value indicating whether the request has been disposed of. /// bool IsDisposed { get; } /// /// Returns true if this object is read-only. /// bool IsReadOnly { get; } /// /// Initialize a new instance of . /// Make sure to check if the is null /// before calling otherwise the existing data will be overridden. /// void InitializePostData(); } }