Skip to content

请求控制类_IFBroSharpRequest

using System;
using System.Collections.Generic;
using FBroSharp.Const;
using FBroSharp.DataType;

namespace FBroSharp.Lib;

//
// 摘要:
//     请求类接口
public interface IFBroSharpRequest : IFBroSharpBase, IDisposable
{
    //
    // 摘要:
    //     是否有效
    bool IsValid { get; }

    //
    // 摘要:
    //     取地址
    //
    //     Returns true if this object is read-only.
    string GetURL();
    
    //
    // 摘要:
    //     取类型 说明:get or post
    //
    //     Get the fully qualified URL.
    string GetMethod();
    
    //
    // 摘要:
    //     取来路地址
    //
    //     Get the referrer URL.
    string GetReferrerURL();
    
    //
    // 摘要:
    //     获取地址_首件cookie
    //
    //     Get the URL to the first party for cookies used in combination with CefURLRequest.
    string GetFirstPartyForCookies();
    
    //
    // 摘要:
    //     取协议头_名称
    //
    //     Get the value for the specified response header field.
    string GetHeaderByName(string name);
    
    //
    // 摘要:
    //     取协议头数据
    //
    //     Get the header values. Will not include the Referer value if any.
    List<FBroSharpStringMap> GetHeaderMap();
    
    //
    // 摘要:
    //     置协议头数据_数组
    //
    //     Set the header values. If a Referer value exists in the header map it will be
    //     removed and ignored.
    void SetHeaderMap_Array(List<FBroSharpStringMap> indata);
    
    //
    // 摘要:
    //     取ID
    //
    //     Returns the globally unique identifier for this request or 0 if not specified.
    //     Can be used by CefResourceRequestHandler implementations in the browser process
    //     to track a single request across multiple callbacks.
    ulong GetIdentifier();
    
    //
    // 摘要:
    //     是否只读
    //
    //     Returns true if this object is read-only.
    bool IsReadOnly();
    
    //
    // 摘要:
    //     置地址
    //
    //     Set the resolved URL after redirects or changed as a result of HSTS.
    void SetURL(string url);
    
    //
    // 摘要:
    //     置类型 说明:get or post
    //
    //     Get the fully qualified URL.
    void SetMethod(string method);
    
    //
    // 摘要:
    //     置来路
    //
    //     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.
    void SetReferrer(string referrer_url, FBroSharpReferrerPolicyType policy);
    
    //
    // 摘要:
    //     取来路类型
    //
    //     Get the referrer policy.
    FBroSharpReferrerPolicyType GetReferrerPolicy();
    
    //
    // 摘要:
    //     请Post数据
    //
    //     Get the post data.
    IFBroSharpPostData GetPostData();
    
    //
    // 摘要:
    //     置Post数据
    //
    //     Set the post data.
    void SetPostData(IFBroSharpPostData postData);
    
    //
    // 摘要:
    //     置协议头数据
    //
    //     Set the header values. If a Referer value exists in the header map it will be
    //     removed and ignored.
    void SetHeaderMap(FBroSharpStringMap indata);
    
    //
    // 摘要:
    //     置协议头_名称
    //
    //     Set the header |name| to |value|. If |overwrite| is true any existing values
    //     will be replaced with the new value. If |overwrite| is false any existing values
    //     will not be overwritten. The Referer value cannot be set using this method.
    void SetHeaderByName(string name, string value, bool overwrite);
    
    //
    // 摘要:
    //     设置
    //
    //     Set all values at one time.
    void Set(string url, string method, IFBroSharpPostData postData, FBroSharpStringMap inheaderMap);
    
    //
    // 摘要:
    //     取标识
    //
    //     Get the flags used in combination with CefURLRequest. See cef_urlrequest_flags_t
    //     for supported values.
    int GetFlags();
    
    //
    // 摘要:
    //     置标识
    //
    //     Set the flags used in combination with CefURLRequest. See cef_urlrequest_flags_t
    //     for supported values.
    void SetFlags(int flags);
    
    //
    // 摘要:
    //     设置地址_首件cookie
    //
    //     Set the URL to the first party for cookies used in combination with CefURLRequest.
    void SetFirstPartyForCookies(string url);
    
    //
    // 摘要:
    //     取资源类型
    //
    //     Get the resource type for this request. Only available in the browser process.
    FBroSharpResourceType GetResourceType();
    
    //
    // 摘要:
    //     取传输类型
    //
    //     Get the transition type for this request. Only available in the browser process
    //     and only applies to requests that represent a main frame or sub-frame navigation.
    FBroSharpTransitionType GetTransitionType();
}
#if false // 反编译日志
缓存中的 15 项
------------------
解析: "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
找到单个程序集: "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
从以下位置加载: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll"
------------------
解析: "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
找到单个程序集: "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
从以下位置加载: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll"
#endif

如果文档对您有帮助,欢迎 请喝咖啡 ☕ | 软件发布 | 源码购买