Exemple #1
0
 /// <summary>
 /// Creates a new URL request that is not associated with a specific browser or
 /// frame.<para/>
 /// For requests originating from the browser process:
 /// <list type="bullet">
 /// <item>
 /// <description>
 /// It may be intercepted by the client via CefResourceRequestHandler or
 /// CefSchemeHandlerFactory;
 /// </description>
 /// </item>
 /// <item>
 /// <description>
 /// POST data may only contain only a single element of type
 /// <see cref="CefPostDataElementType.File"/> or <see cref="CefPostDataElementType.Bytes"/>.
 /// </description>
 /// </item>
 /// </list>
 /// For requests originating from the render process:
 /// <list type="bullet">
 /// <item>
 /// <description>
 /// It cannot be intercepted by the client so only http(s) and blob schemes
 /// are supported.
 /// </description>
 /// </item>
 /// <item>
 /// <description>
 /// POST data may only contain a single element of type <see cref="CefPostDataElementType.Bytes"/>.
 /// </description>
 /// </item>
 /// </list>
 /// </summary>
 /// <remarks>
 /// Use <see cref="CefFrame.CreateUrlRequest"/> instead if you want the request to
 /// have this association, in which case it may be handled differently (see
 /// documentation on that function). Requests may originate from the both browser
 /// process and the render process.
 /// </remarks>
 /// <param name="request">
 /// The <see cref="CefRequest"/> object. It will be marked as read-only after calling
 /// this function.
 /// </param>
 /// <param name="client">
 /// The <see cref="CefUrlRequestClient"/> object to handle the resulting response.
 /// </param>
 /// <param name="context">
 /// A request context or null, if <paramref name="context"/> is empty the global
 /// request context will be used. For requests originating from the render process
 /// this parameter must be null.
 /// </param>
 public CefUrlRequest(CefRequest request, CefUrlRequestClient client, CefRequestContext context)
     : this(CefNativeApi.cef_urlrequest_create(
                (request ?? throw new ArgumentNullException(nameof(request))).GetNativeInstance(),
Exemple #2
0
 /// <summary>
 /// Create a new URL request that will be treated as originating from this
 /// frame and the associated browser. This request may be intercepted by the
 /// client via cef_resource_request_handler_t or cef_scheme_handler_factory_t.
 /// Use cef_urlrequest_t::Create instead if you do not want the request to have
 /// this association, in which case it may be handled differently (see
 /// documentation on that function). Requests may originate from both the
 /// browser process and the render process.
 /// For requests originating from the browser process:
 /// - POST data may only contain a single element of type PDE_TYPE_FILE or
 /// PDE_TYPE_BYTES.
 /// For requests originating from the render process:
 /// - POST data may only contain a single element of type PDE_TYPE_BYTES.
 /// - If the response contains Content-Disposition or Mime-Type header values
 /// that would not normally be rendered then the response may receive
 /// special handling inside the browser (for example, via the file download
 /// code path instead of the URL request code path).
 /// The |request| object will be marked as read-only after calling this
 /// function.
 /// </summary>
 public unsafe virtual CefUrlRequest CreateUrlRequest(CefRequest request, CefUrlRequestClient client)
 {
     return(SafeCall(CefUrlRequest.Wrap(CefUrlRequest.Create, NativeInstance->CreateUrlRequest((request != null) ? request.GetNativeInstance() : null, (client != null) ? client.GetNativeInstance() : null))));
 }