In Files
- net/http/request.rb
Parent
Methods
Class/Module Index
- EXCEPTION_TYPE
- EXCEPTION_TYPE
- EXCEPTION_TYPE
- EXCEPTION_TYPE
- HTTPMovedTemporarily
- HTTPMultipleChoice
- HTTPRequestURITooLarge
- Net
- Net::HTTP
- Net::HTTP::Copy
- Net::HTTP::Delete
- Net::HTTP::Get
- Net::HTTP::Head
- Net::HTTP::Lock
- Net::HTTP::Mkcol
- Net::HTTP::Move
- Net::HTTP::Options
- Net::HTTP::Patch
- Net::HTTP::Post
- Net::HTTP::Propfind
- Net::HTTP::Proppatch
- Net::HTTP::Put
- Net::HTTP::Trace
- Net::HTTP::Unlock
- Net::HTTPAccepted
- Net::HTTPBadGateway
- Net::HTTPBadRequest
- Net::HTTPClientError
- Net::HTTPConflict
- Net::HTTPContinue
- Net::HTTPCreated
- Net::HTTPError
- Net::HTTPExceptions
- Net::HTTPExpectationFailed
- Net::HTTPFailedDependency
- Net::HTTPFatalError
- Net::HTTPForbidden
- Net::HTTPFound
- Net::HTTPGatewayTimeOut
- Net::HTTPGenericRequest
- Net::HTTPGone
- Net::HTTPHeader
- Net::HTTPIMUsed
- Net::HTTPInformation
- Net::HTTPInsufficientStorage
- Net::HTTPInternalServerError
- Net::HTTPLengthRequired
- Net::HTTPLocked
- Net::HTTPMethodNotAllowed
- Net::HTTPMovedPermanently
- Net::HTTPMultiStatus
- Net::HTTPMultipleChoices
- Net::HTTPNetworkAuthenticationRequired
- Net::HTTPNoContent
- Net::HTTPNonAuthoritativeInformation
- Net::HTTPNotAcceptable
- Net::HTTPNotFound
- Net::HTTPNotImplemented
- Net::HTTPNotModified
- Net::HTTPOK
- Net::HTTPPartialContent
- Net::HTTPPaymentRequired
- Net::HTTPPermanentRedirect
- Net::HTTPPreconditionFailed
- Net::HTTPPreconditionRequired
- Net::HTTPProxyAuthenticationRequired
- Net::HTTPRedirection
- Net::HTTPRequest
- Net::HTTPRequestEntityTooLarge
- Net::HTTPRequestHeaderFieldsTooLarge
- Net::HTTPRequestTimeOut
- Net::HTTPRequestURITooLong
- Net::HTTPRequestedRangeNotSatisfiable
- Net::HTTPResetContent
- Net::HTTPResponse
- Net::HTTPRetriableError
- Net::HTTPSeeOther
- Net::HTTPServerError
- Net::HTTPServerException
- Net::HTTPServiceUnavailable
- Net::HTTPSuccess
- Net::HTTPSwitchProtocol
- Net::HTTPTemporaryRedirect
- Net::HTTPTooManyRequests
- Net::HTTPUnauthorized
- Net::HTTPUnknownResponse
- Net::HTTPUnprocessableEntity
- Net::HTTPUnsupportedMediaType
- Net::HTTPUpgradeRequired
- Net::HTTPUseProxy
- Net::HTTPVersionNotSupported
Net::HTTPRequest
frozen_string_literal: false HTTP request class. This class wraps together the request header and the request path. You cannot use this class directly. Instead, you should use one of its subclasses: Net::HTTP::Get, Net::HTTP::Post, Net::HTTP::Head.
Public Class Methods
new(path, initheader = nil)
Creates an HTTP request object for path
.
initheader
are the default headers to use. Net::HTTP adds Accept-Encoding to enable compression
of the response body unless Accept-Encoding or Range are supplied in
initheader
.
# File net/http/request.rb, line 14 def initialize(path, initheader = nil) super self.class::METHOD, self.class::REQUEST_HAS_BODY, self.class::RESPONSE_HAS_BODY, path, initheader end