tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIReplacedHttpResponse.idl (1180B)


      1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
      2 *
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #include "nsISupports.idl"
      8 interface nsIHttpHeaderVisitor;
      9 
     10 /**
     11 * nsIHttpChannel
     12 *
     13 * This interface allows to create an object holding mocked data which will
     14 * replace the response for a channel. To override the channel's response
     15 * use nsIHttpChannelInternal::setResponseOverride with an instance of
     16 * nsIReplacedHttpResponse as parameter.
     17 */
     18 [scriptable, uuid(067cb318-9b67-4442-9c1c-93e62dac8a7c)]
     19 interface nsIReplacedHttpResponse : nsISupports
     20 {
     21    [must_use] void init();
     22    [must_use] attribute ACString responseBody;
     23    [must_use] attribute unsigned long responseStatus;
     24    [must_use] attribute ACString responseStatusText;
     25 
     26    [must_use] void visitResponseHeaders(in nsIHttpHeaderVisitor visitor);
     27    [must_use] void setResponseHeader(in ACString header,
     28                                      in ACString value,
     29                                      in boolean merge);
     30 };