1# frozen_string_literal: false
2# HTTP request class.
3# This class wraps together the request header and the request path.
4# You cannot use this class directly. Instead, you should use one of its
5# subclasses: Net::HTTP::Get, Net::HTTP::Post, Net::HTTP::Head.
6#
7class Net::HTTPRequest < Net::HTTPGenericRequest
8  # Creates an HTTP request object for +path+.
9  #
10  # +initheader+ are the default headers to use.  Net::HTTP adds
11  # Accept-Encoding to enable compression of the response body unless
12  # Accept-Encoding or Range are supplied in +initheader+.
13
14  def initialize(path, initheader = nil)
15    super self.class::METHOD,
16          self.class::REQUEST_HAS_BODY,
17          self.class::RESPONSE_HAS_BODY,
18          path, initheader
19  end
20end
21
22