// Copyright © 2010-2016 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 System;
using System.Collections.Specialized;
namespace CefSharp
{
public interface IRequest : IDisposable
{
///
/// Request Url
///
string Url { get; set; }
///
/// 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 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; }
///
/// Initialize a new instance of .
/// Make sure to check if the is null
/// before calling otherwise the existing data will be overridden.
///
void InitializePostData();
}
}