tor-browser

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

nsIBinaryHttp.idl (1787B)


      1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #include "nsISupports.idl"
      7 
      8 [scriptable, uuid(f6f899cc-683a-43da-9206-0eb0c09cc758)]
      9 interface nsIBinaryHttpRequest : nsISupports {
     10  readonly attribute ACString method;
     11  readonly attribute ACString scheme;
     12  readonly attribute ACString authority;
     13  readonly attribute ACString path;
     14  readonly attribute Array<ACString> headerNames;
     15  readonly attribute Array<ACString> headerValues;
     16  readonly attribute Array<octet> content;
     17 };
     18 
     19 [scriptable, uuid(6ca85d9c-cdc5-45d4-9adc-005abedce9c9)]
     20 interface nsIBinaryHttpResponse : nsISupports {
     21  readonly attribute uint16_t status;
     22  readonly attribute Array<ACString> headerNames;
     23  readonly attribute Array<ACString> headerValues;
     24  readonly attribute Array<octet> content;
     25 };
     26 
     27 // Implements Binary Representation of HTTP Messages (RFC 9292).
     28 // In normal operation, encodeRequest and decodeResponse are expected to be
     29 // used. For testing, decodeRequest and encodeResponse are available as well.
     30 // Thread safety: this interface may be used on any thread, but objects
     31 // returned by it are not inherently thread-safe and should only be used on the
     32 // threads they were created on.
     33 [scriptable, builtinclass, uuid(b43b3f73-8160-4ab2-9f5d-4129a9708081)]
     34 interface nsIBinaryHttp : nsISupports {
     35  Array<octet> encodeRequest(in nsIBinaryHttpRequest request);
     36  nsIBinaryHttpRequest decodeRequest(in Array<octet> request);
     37 
     38  nsIBinaryHttpResponse decodeResponse(in Array<octet> response);
     39  Array<octet> encodeResponse(in nsIBinaryHttpResponse response);
     40 };