tor-browser

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

BinaryHttpRequest.cpp (1341B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set sw=2 ts=8 et tw=80 : */
      3 
      4 /* This Source Code Form is subject to the terms of the Mozilla Public
      5 * License, v. 2.0. If a copy of the MPL was not distributed with this
      6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      7 
      8 #include "BinaryHttpRequest.h"
      9 
     10 namespace mozilla::net {
     11 
     12 NS_IMPL_ISUPPORTS(BinaryHttpRequest, nsIBinaryHttpRequest)
     13 
     14 NS_IMETHODIMP BinaryHttpRequest::GetMethod(nsACString& aMethod) {
     15  aMethod.Assign(mMethod);
     16  return NS_OK;
     17 }
     18 
     19 NS_IMETHODIMP BinaryHttpRequest::GetScheme(nsACString& aScheme) {
     20  aScheme.Assign(mScheme);
     21  return NS_OK;
     22 }
     23 
     24 NS_IMETHODIMP BinaryHttpRequest::GetAuthority(nsACString& aAuthority) {
     25  aAuthority.Assign(mAuthority);
     26  return NS_OK;
     27 }
     28 
     29 NS_IMETHODIMP BinaryHttpRequest::GetPath(nsACString& aPath) {
     30  aPath.Assign(mPath);
     31  return NS_OK;
     32 }
     33 
     34 NS_IMETHODIMP BinaryHttpRequest::GetHeaderNames(
     35    nsTArray<nsCString>& aHeaderNames) {
     36  aHeaderNames.Assign(mHeaderNames);
     37  return NS_OK;
     38 }
     39 
     40 NS_IMETHODIMP BinaryHttpRequest::GetHeaderValues(
     41    nsTArray<nsCString>& aHeaderValues) {
     42  aHeaderValues.Assign(mHeaderValues);
     43  return NS_OK;
     44 }
     45 
     46 NS_IMETHODIMP BinaryHttpRequest::GetContent(nsTArray<uint8_t>& aContent) {
     47  aContent.Assign(mContent);
     48  return NS_OK;
     49 }
     50 
     51 }  // namespace mozilla::net