@@ -173,7 +173,7 @@ class HTTPHeaderSyntaxError < StandardError; end
173173 # {Request Fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields].
174174 # A host may also accept other custom fields.
175175 #
176- # == Sessions
176+ # == \HTTP Sessions
177177 #
178178 # A _session_ is a connection between a server (host) and a client that:
179179 #
@@ -454,6 +454,271 @@ class HTTPHeaderSyntaxError < StandardError; end
454454 # - Any other value:
455455 # leaves the body and header unchanged.
456456 #
457+ # == What's Here
458+ #
459+ # This is a categorized summary of methods and attributes.
460+ #
461+ # === \Net::HTTP Objects
462+ #
463+ # - {::new}[rdoc-ref:Net::HTTP.new]:
464+ # Creates a new instance.
465+ # - {#inspect}[rdoc-ref:Net::HTTP#inspect]:
466+ # Returns a string representation of +self+.
467+ #
468+ # === Sessions
469+ #
470+ # - {::start}[rdoc-ref:Net::HTTP.start]:
471+ # Begins a new session in a new \Net::HTTP object.
472+ # - {#started?}[rdoc-ref:Net::HTTP#started?]
473+ # (aliased as {#active?}[rdoc-ref:Net::HTTP#active?]):
474+ # Returns whether in a session.
475+ # - {#finish}[rdoc-ref:Net::HTTP#finish]:
476+ # Ends an active session.
477+ # - {#start}[rdoc-ref:Net::HTTP#start]:
478+ # Begins a new session in an existing \Net::HTTP object (+self+).
479+ #
480+ # === Connections
481+ #
482+ # - {:continue_timeout}[rdoc-ref:Net::HTTP#continue_timeout]:
483+ # Returns the continue timeout.
484+ # - {#continue_timeout=}[rdoc-ref:Net::HTTP#continue_timeout=]:
485+ # Sets the continue timeout seconds.
486+ # - {:keep_alive_timeout}[rdoc-ref:Net::HTTP#keep_alive_timeout]:
487+ # Returns the keep-alive timeout.
488+ # - {:keep_alive_timeout=}[rdoc-ref:Net::HTTP#keep_alive_timeout=]:
489+ # Sets the keep-alive timeout.
490+ # - {:max_retries}[rdoc-ref:Net::HTTP#max_retries]:
491+ # Returns the maximum retries.
492+ # - {#max_retries=}[rdoc-ref:Net::HTTP#max_retries=]:
493+ # Sets the maximum retries.
494+ # - {:open_timeout}[rdoc-ref:Net::HTTP#open_timeout]:
495+ # Returns the open timeout.
496+ # - {:open_timeout=}[rdoc-ref:Net::HTTP#open_timeout=]:
497+ # Sets the open timeout.
498+ # - {:read_timeout}[rdoc-ref:Net::HTTP#read_timeout]:
499+ # Returns the open timeout.
500+ # - {:read_timeout=}[rdoc-ref:Net::HTTP#read_timeout=]:
501+ # Sets the read timeout.
502+ # - {:ssl_timeout}[rdoc-ref:Net::HTTP#ssl_timeout]:
503+ # Returns the ssl timeout.
504+ # - {:ssl_timeout=}[rdoc-ref:Net::HTTP#ssl_timeout=]:
505+ # Sets the ssl timeout.
506+ # - {:write_timeout}[rdoc-ref:Net::HTTP#write_timeout]:
507+ # Returns the write timeout.
508+ # - {write_timeout=}[rdoc-ref:Net::HTTP#write_timeout=]:
509+ # Sets the write timeout.
510+ #
511+ # === Requests
512+ #
513+ # - {::get}[rdoc-ref:Net::HTTP.get]:
514+ # Sends a GET request and returns the string response body.
515+ # - {::get_print}[rdoc-ref:Net::HTTP.get_print]:
516+ # Sends a GET request and write the string response body to $stdout.
517+ # - {::get_response}[rdoc-ref:Net::HTTP.get_response]:
518+ # Sends a GET request and returns a response object.
519+ # - {::post_form}[rdoc-ref:Net::HTTP.post_form]:
520+ # Sends a POST request with form data and returns a response object.
521+ # - {::post}[rdoc-ref:Net::HTTP.post]:
522+ # Sends a POST request with data and returns a response object.
523+ # - {#copy}[rdoc-ref:Net::HTTP#copy]:
524+ # Sends a COPY request and returns a response object.
525+ # - {#delete}[rdoc-ref:Net::HTTP#delete]:
526+ # Sends a DELETE request and returns a response object.
527+ # - {#get}[rdoc-ref:Net::HTTP#get]:
528+ # Sends a GET request and returns a response object.
529+ # - {#head}[rdoc-ref:Net::HTTP#head]:
530+ # Sends a HEAD request and returns a response object.
531+ # - {#lock}[rdoc-ref:Net::HTTP#lock]:
532+ # Sends a LOCK request and returns a response object.
533+ # - {#mkcol}[rdoc-ref:Net::HTTP#mkcol]:
534+ # Sends a MKCOL request and returns a response object.
535+ # - {#move}[rdoc-ref:Net::HTTP#move]:
536+ # Sends a MOVE request and returns a response object.
537+ # - {#options}[rdoc-ref:Net::HTTP#options]:
538+ # Sends a OPTIONS request and returns a response object.
539+ # - {#patch}[rdoc-ref:Net::HTTP#patch]:
540+ # Sends a PATCH request and returns a response object.
541+ # - {#post}[rdoc-ref:Net::HTTP#post]:
542+ # Sends a POST request and returns a response object.
543+ # - {#propfind}[rdoc-ref:Net::HTTP#propfind]:
544+ # Sends a PROPFIND request and returns a response object.
545+ # - {#proppatch}[rdoc-ref:Net::HTTP#proppatch]:
546+ # Sends a PROPPATCH request and returns a response object.
547+ # - {#put}[rdoc-ref:Net::HTTP#put]:
548+ # Sends a PUT request and returns a response object.
549+ # - {#request}[rdoc-ref:Net::HTTP#request]:
550+ # Sends a request and returns a response object.
551+ # - {#request_get}[rdoc-ref:Net::HTTP#request_get]
552+ # (aliased as {#get2}[rdoc-ref:Net::HTTP#get2]):
553+ # Sends a GET request and forms a response object;
554+ # if a block given, calls the block with the object,
555+ # otherwise returns the object.
556+ # - {#request_head}[rdoc-ref:Net::HTTP#request_head]
557+ # (aliased as {#head2}[rdoc-ref:Net::HTTP#head2]):
558+ # Sends a HEAD request and forms a response object;
559+ # if a block given, calls the block with the object,
560+ # otherwise returns the object.
561+ # - {#request_post}[rdoc-ref:Net::HTTP#request_post]
562+ # (aliased as {#post2}[rdoc-ref:Net::HTTP#post2]):
563+ # Sends a POST request and forms a response object;
564+ # if a block given, calls the block with the object,
565+ # otherwise returns the object.
566+ # - {#send_request}[rdoc-ref:Net::HTTP#send_request]:
567+ # Sends a request and returns a response object.
568+ # - {#trace}[rdoc-ref:Net::HTTP#trace]:
569+ # Sends a TRACE request and returns a response object.
570+ # - {#unlock}[rdoc-ref:Net::HTTP#unlock]:
571+ # Sends an UNLOCK request and returns a response object.
572+ #
573+ # === Responses
574+ #
575+ # - {:close_on_empty_response}[rdoc-ref:Net::HTTP#close_on_empty_response]:
576+ # Returns whether to close connection on empty response.
577+ # - {:close_on_empty_response=}[rdoc-ref:Net::HTTP#close_on_empty_response=]:
578+ # Sets whether to close connection on empty response.
579+ # - {:ignore_eof}[rdoc-ref:Net::HTTP#ignore_eof]:
580+ # Returns whether to ignore end-of-file when reading a response body
581+ # with <tt>Content-Length</tt> headers.
582+ # - {:ignore_eof=}[rdoc-ref:Net::HTTP#ignore_eof=]:
583+ # Sets whether to ignore end-of-file when reading a response body
584+ # with <tt>Content-Length</tt> headers.
585+ # - {:response_body_encoding}[rdoc-ref:Net::HTTP#response_body_encoding]:
586+ # Returns the encoding to use for the response body.
587+ # - {#response_body_encoding=}[rdoc-ref:Net::HTTP#response_body_encoding=]:
588+ # Sets the response body encoding.
589+ #
590+ # === Proxies
591+ #
592+ # - {:proxy_address}[rdoc-ref:Net::HTTP#proxy_address]:
593+ # Returns the proxy address.
594+ # - {:proxy_address=}[rdoc-ref:Net::HTTP#proxy_address=]:
595+ # Sets the proxy address.
596+ # - {::proxy_class?}[rdoc-ref:Net::HTTP.proxy_class?]:
597+ # Returns whether +self+ is a proxy class.
598+ # - {#proxy?}[rdoc-ref:Net::HTTP#proxy?]:
599+ # Returns whether +self+ has a proxy.
600+ # - {#proxy_address}[rdoc-ref:Net::HTTP#proxy_address]
601+ # (aliased as {#proxyaddr}[rdoc-ref:Net::HTTP#proxyaddr]):
602+ # Returns the proxy address.
603+ # - {#proxy_from_env?}[rdoc-ref:Net::HTTP#proxy_from_env?]:
604+ # Returns whether the proxy is taken from an environment variable.
605+ # - {:proxy_from_env=}[rdoc-ref:Net::HTTP#proxy_from_env=]:
606+ # Sets whether the proxy is to be taken from an environment variable.
607+ # - {:proxy_pass}[rdoc-ref:Net::HTTP#proxy_pass]:
608+ # Returns the proxy password.
609+ # - {:proxy_pass=}[rdoc-ref:Net::HTTP#proxy_pass=]:
610+ # Sets the proxy password.
611+ # - {:proxy_port}[rdoc-ref:Net::HTTP#proxy_port]:
612+ # Returns the proxy port.
613+ # - {:proxy_port=}[rdoc-ref:Net::HTTP#proxy_port=]:
614+ # Sets the proxy port.
615+ # - {#proxy_user}[rdoc-ref:Net::HTTP#proxy_user]:
616+ # Returns the proxy user name.
617+ # - {:proxy_user=}[rdoc-ref:Net::HTTP#proxy_user=]:
618+ # Sets the proxy user.
619+ #
620+ # === Security
621+ #
622+ # - {:ca_file}[rdoc-ref:Net::HTTP#ca_file]:
623+ # Returns the path to a CA certification file.
624+ # - {:ca_file=}[rdoc-ref:Net::HTTP#ca_file=]:
625+ # Sets the path to a CA certification file.
626+ # - {:ca_path}[rdoc-ref:Net::HTTP#ca_path]:
627+ # Returns the path of to CA directory containing certification files.
628+ # - {:ca_path=}[rdoc-ref:Net::HTTP#ca_path=]:
629+ # Sets the path of to CA directory containing certification files.
630+ # - {:cert}[rdoc-ref:Net::HTTP#cert]:
631+ # Returns the OpenSSL::X509::Certificate object to be used for client certification.
632+ # - {:cert=}[rdoc-ref:Net::HTTP#cert=]:
633+ # Sets the OpenSSL::X509::Certificate object to be used for client certification.
634+ # - {:cert_store}[rdoc-ref:Net::HTTP#cert_store]:
635+ # Returns the X509::Store to be used for verifying peer certificate.
636+ # - {:cert_store=}[rdoc-ref:Net::HTTP#cert_store=]:
637+ # Sets the X509::Store to be used for verifying peer certificate.
638+ # - {:ciphers}[rdoc-ref:Net::HTTP#ciphers]:
639+ # Returns the available SSL ciphers.
640+ # - {:ciphers=}[rdoc-ref:Net::HTTP#ciphers=]:
641+ # Sets the available SSL ciphers.
642+ # - {:extra_chain_cert}[rdoc-ref:Net::HTTP#extra_chain_cert]:
643+ # Returns the extra X509 certificates to be added to the certificate chain.
644+ # - {:extra_chain_cert=}[rdoc-ref:Net::HTTP#extra_chain_cert=]:
645+ # Sets the extra X509 certificates to be added to the certificate chain.
646+ # - {:key}[rdoc-ref:Net::HTTP#key]:
647+ # Returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
648+ # - {:key=}[rdoc-ref:Net::HTTP#key=]:
649+ # Sets the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
650+ # - {:max_version}[rdoc-ref:Net::HTTP#max_version]:
651+ # Returns the maximum SSL version.
652+ # - {:max_version=}[rdoc-ref:Net::HTTP#max_version=]:
653+ # Sets the maximum SSL version.
654+ # - {:min_version}[rdoc-ref:Net::HTTP#min_version]:
655+ # Returns the minimum SSL version.
656+ # - {:min_version=}[rdoc-ref:Net::HTTP#min_version=]:
657+ # Sets the minimum SSL version.
658+ # - {#peer_cert}[rdoc-ref:Net::HTTP#peer_cert]:
659+ # Returns the X509 certificate chain for the session's socket peer.
660+ # - {:ssl_version}[rdoc-ref:Net::HTTP#ssl_version]:
661+ # Returns the SSL version.
662+ # - {:ssl_version=}[rdoc-ref:Net::HTTP#ssl_version=]:
663+ # Sets the SSL version.
664+ # - {#use_ssl=}[rdoc-ref:Net::HTTP#use_ssl=]:
665+ # Sets whether a new session is to use Transport Layer Security.
666+ # - {#use_ssl?}[rdoc-ref:Net::HTTP#use_ssl?]:
667+ # Returns whether +self+ uses SSL.
668+ # - {:verify_callback}[rdoc-ref:Net::HTTP#verify_callback]:
669+ # Returns the callback for the server certification verification.
670+ # - {:verify_callback=}[rdoc-ref:Net::HTTP#verify_callback=]:
671+ # Sets the callback for the server certification verification.
672+ # - {:verify_depth}[rdoc-ref:Net::HTTP#verify_depth]:
673+ # Returns the maximum depth for the certificate chain verification.
674+ # - {:verify_depth=}[rdoc-ref:Net::HTTP#verify_depth=]:
675+ # Sets the maximum depth for the certificate chain verification.
676+ # - {:verify_hostname}[rdoc-ref:Net::HTTP#verify_hostname]:
677+ # Returns the flags for server the certification verification at the beginning of the SSL/TLS session.
678+ # - {:verify_hostname=}[rdoc-ref:Net::HTTP#verify_hostname=]:
679+ # Sets he flags for server the certification verification at the beginning of the SSL/TLS session.
680+ # - {:verify_mode}[rdoc-ref:Net::HTTP#verify_mode]:
681+ # Returns the flags for server the certification verification at the beginning of the SSL/TLS session.
682+ # - {:verify_mode=}[rdoc-ref:Net::HTTP#verify_mode=]:
683+ # Sets the flags for server the certification verification at the beginning of the SSL/TLS session.
684+ #
685+ # === Addresses and Ports
686+ #
687+ # - {:address}[rdoc-ref:Net::HTTP#address]:
688+ # Returns the string host name or host IP.
689+ # - {::default_port}[rdoc-ref:Net::HTTP.default_port]:
690+ # Returns integer 80, the default port to use for HTTP requests.
691+ # - {::http_default_port}[rdoc-ref:Net::HTTP.http_default_port]:
692+ # Returns integer 80, the default port to use for HTTP requests.
693+ # - {::https_default_port}[rdoc-ref:Net::HTTP.https_default_port]:
694+ # Returns integer 443, the default port to use for HTTPS requests.
695+ # - {#ipaddr}[rdoc-ref:Net::HTTP#ipaddr]:
696+ # Returns the IP address for the connection.
697+ # - {#ipaddr=}[rdoc-ref:Net::HTTP#ipaddr=]:
698+ # Sets the IP address for the connection.
699+ # - {:local_host}[rdoc-ref:Net::HTTP#local_host]:
700+ # Returns the string local host used to establish the connection.
701+ # - {:local_host=}[rdoc-ref:Net::HTTP#local_host=]:
702+ # Sets the string local host used to establish the connection.
703+ # - {:local_port}[rdoc-ref:Net::HTTP#local_port]:
704+ # Returns the integer local port used to establish the connection.
705+ # - {:local_port=}[rdoc-ref:Net::HTTP#local_port=]:
706+ # Sets the integer local port used to establish the connection.
707+ # - {:port}[rdoc-ref:Net::HTTP#port]:
708+ # Returns the integer port number.
709+ #
710+ # === \HTTP Version
711+ #
712+ # - {::version_1_2?}[rdoc-ref:Net::HTTP.version_1_2?]
713+ # (aliased as {::is_version_1_2?}[rdoc-ref:Net::HTTP.is_version_1_2?]
714+ # and {::version_1_2}[rdoc-ref:Net::HTTP.version_1_2]):
715+ # Returns true; retained for compatibility.
716+ #
717+ # === Debugging
718+ #
719+ # - {#set_debug_output}[rdoc-ref:Net::HTTP#set_debug_output]:
720+ # Sets the output stream for debugging.
721+ #
457722 class HTTP < Protocol
458723
459724 # :stopdoc:
@@ -1494,7 +1759,7 @@ def HTTP.Proxy(p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil) #:nodoc:
14941759 end
14951760
14961761 class << HTTP
1497- # returns true if self is a class which was created by HTTP::Proxy.
1762+ # Returns true if self is a class which was created by HTTP::Proxy.
14981763 def proxy_class?
14991764 defined? ( @is_proxy_class ) ? @is_proxy_class : false
15001765 end
0 commit comments