lunchmoney 1.3.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +7 -0
  3. data/.github/workflows/build_and_publish_yard_docs.yml +2 -2
  4. data/.github/workflows/ci.yml +1 -1
  5. data/.ruby-version +1 -1
  6. data/.simplecov +2 -2
  7. data/Gemfile +2 -3
  8. data/Gemfile.lock +90 -84
  9. data/lib/lunchmoney/api.rb +1 -0
  10. data/lib/lunchmoney/calls/categories.rb +0 -2
  11. data/lib/lunchmoney/calls/transactions.rb +0 -1
  12. data/lib/lunchmoney/deprecate.rb +35 -0
  13. data/lib/lunchmoney/objects/asset.rb +6 -1
  14. data/lib/lunchmoney/objects/plaid_account.rb +6 -1
  15. data/lib/lunchmoney/objects/transaction.rb +9 -1
  16. data/lib/lunchmoney/version.rb +1 -1
  17. data/sorbet/rbi/annotations/activesupport.rbi +36 -0
  18. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  19. data/sorbet/rbi/gems/{activesupport@7.1.3.2.rbi → activesupport@7.2.2.1.rbi} +1407 -1292
  20. data/sorbet/rbi/gems/{addressable@2.8.6.rbi → addressable@2.8.7.rbi} +2 -1
  21. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
  22. data/sorbet/rbi/gems/{bigdecimal@3.1.7.rbi → bigdecimal@3.1.9.rbi} +1 -0
  23. data/sorbet/rbi/gems/{chef-utils@18.4.2.rbi → chef-utils@18.5.0.rbi} +1 -0
  24. data/sorbet/rbi/gems/{concurrent-ruby@1.2.3.rbi → concurrent-ruby@1.3.5.rbi} +108 -41
  25. data/sorbet/rbi/gems/{connection_pool@2.4.1.rbi → connection_pool@2.5.0.rbi} +1 -0
  26. data/sorbet/rbi/gems/{docile@1.4.0.rbi → docile@1.4.1.rbi} +1 -0
  27. data/sorbet/rbi/gems/{dotenv@3.1.2.rbi → dotenv@3.1.7.rbi} +21 -29
  28. data/sorbet/rbi/gems/{erubi@1.12.0.rbi → erubi@1.13.1.rbi} +25 -15
  29. data/sorbet/rbi/gems/{faraday-net_http@3.1.0.rbi → faraday-net_http@3.4.0.rbi} +30 -29
  30. data/sorbet/rbi/gems/{faraday@2.9.0.rbi → faraday@2.12.2.rbi} +104 -49
  31. data/sorbet/rbi/gems/{hashdiff@1.1.0.rbi → hashdiff@1.1.2.rbi} +3 -2
  32. data/sorbet/rbi/gems/{i18n@1.14.4.rbi → i18n@1.14.7.rbi} +109 -80
  33. data/sorbet/rbi/gems/{json@2.7.2.rbi → json@2.10.2.rbi} +697 -146
  34. data/sorbet/rbi/gems/language_server-protocol@3.17.0.4.rbi +9 -0
  35. data/sorbet/rbi/gems/logger@1.6.6.rbi +940 -0
  36. data/sorbet/rbi/gems/{minitest@5.22.3.rbi → minitest@5.25.5.rbi} +319 -302
  37. data/sorbet/rbi/gems/{mixlib-shellout@3.2.7.rbi → mixlib-shellout@3.2.8.rbi} +1 -0
  38. data/sorbet/rbi/gems/{mocha@2.2.0.rbi → mocha@2.7.1.rbi} +174 -149
  39. data/sorbet/rbi/gems/{net-http@0.4.1.rbi → net-http@0.6.0.rbi} +360 -181
  40. data/sorbet/rbi/gems/{parallel@1.24.0.rbi → parallel@1.26.3.rbi} +32 -21
  41. data/sorbet/rbi/gems/{parser@3.3.1.0.rbi → parser@3.3.7.1.rbi} +256 -203
  42. data/sorbet/rbi/gems/{prism@0.29.0.rbi → prism@1.4.0.rbi} +15882 -12137
  43. data/sorbet/rbi/gems/{public_suffix@5.0.4.rbi → public_suffix@6.0.1.rbi} +1 -0
  44. data/sorbet/rbi/gems/{racc@1.7.3.rbi → racc@1.8.1.rbi} +34 -33
  45. data/sorbet/rbi/gems/{rack@3.0.10.rbi → rack@3.1.9.rbi} +704 -989
  46. data/sorbet/rbi/gems/{rake@13.1.0.rbi → rake@13.2.1.rbi} +56 -55
  47. data/sorbet/rbi/gems/rbi@0.3.1.rbi +6599 -0
  48. data/sorbet/rbi/gems/rbs@3.9.0.rbi +6978 -0
  49. data/sorbet/rbi/gems/{regexp_parser@2.9.1.rbi → regexp_parser@2.10.0.rbi} +195 -172
  50. data/sorbet/rbi/gems/{rexml@3.2.6.rbi → rexml@3.4.1.rbi} +844 -279
  51. data/sorbet/rbi/gems/{rubocop-ast@1.31.3.rbi → rubocop-ast@1.38.0.rbi} +1380 -732
  52. data/sorbet/rbi/gems/{rubocop-minitest@0.35.0.rbi → rubocop-minitest@0.36.0.rbi} +13 -10
  53. data/sorbet/rbi/gems/{rubocop-rails@2.24.1.rbi → rubocop-rails@2.29.1.rbi} +9604 -6343
  54. data/sorbet/rbi/gems/{rubocop-sorbet@0.8.3.rbi → rubocop-sorbet@0.8.7.rbi} +168 -67
  55. data/sorbet/rbi/gems/{rubocop@1.63.5.rbi → rubocop@1.71.2.rbi} +6831 -4378
  56. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
  57. data/sorbet/rbi/gems/spoom@1.6.1.rbi +7274 -0
  58. data/sorbet/rbi/gems/{tapioca@0.14.1.rbi → tapioca@0.16.11.rbi} +471 -384
  59. data/sorbet/rbi/gems/{thor@1.3.1.rbi → thor@1.3.2.rbi} +58 -31
  60. data/sorbet/rbi/gems/{toys-core@0.15.5.rbi → toys-core@0.15.6.rbi} +1 -0
  61. data/sorbet/rbi/gems/{toys@0.15.5.rbi → toys@0.15.6.rbi} +4 -3
  62. data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +132 -0
  63. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
  64. data/sorbet/rbi/gems/{uri@0.13.0.rbi → uri@1.0.3.rbi} +278 -256
  65. data/sorbet/rbi/gems/{vcr@6.2.0.rbi → vcr@6.3.1.rbi} +72 -68
  66. data/sorbet/rbi/gems/{webmock@3.23.0.rbi → webmock@3.25.1.rbi} +102 -78
  67. data/sorbet/rbi/gems/{yard-sorbet@0.8.1.rbi → yard-sorbet@0.9.0.rbi} +36 -29
  68. data/sorbet/rbi/gems/{yard@0.9.36.rbi → yard@0.9.37.rbi} +394 -235
  69. metadata +55 -58
  70. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3426
  71. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14237
  72. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -272
  73. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +0 -93
  74. data/sorbet/rbi/gems/pry-sorbet@0.2.1.rbi +0 -966
  75. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10077
  76. data/sorbet/rbi/gems/rbi@0.1.13.rbi +0 -3078
  77. data/sorbet/rbi/gems/spoom@1.3.2.rbi +0 -4421
  78. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -65
@@ -4,6 +4,7 @@
4
4
  # This is an autogenerated file for types exported from the `net-http` gem.
5
5
  # Please instead update this file by running `bin/tapioca gem net-http`.
6
6
 
7
+
7
8
  # \Class \Net::HTTP provides a rich library that implements the client
8
9
  # in a client-server model that uses the \HTTP request-response protocol.
9
10
  # For information about \HTTP, see:
@@ -39,6 +40,8 @@
39
40
  # Net::HTTP.post(uri, data)
40
41
  # params = {title: 'foo', body: 'bar', userId: 1}
41
42
  # Net::HTTP.post_form(uri, params)
43
+ # data = '{"title": "foo", "body": "bar", "userId": 1}'
44
+ # Net::HTTP.put(uri, data)
42
45
  #
43
46
  # - If performance is important, consider using sessions, which lower request overhead.
44
47
  # This {session}[rdoc-ref:Net::HTTP@Sessions] has multiple requests for
@@ -428,6 +431,10 @@
428
431
  #
429
432
  # == What's Here
430
433
  #
434
+ # First, what's elsewhere. Class Net::HTTP:
435
+ #
436
+ # - Inherits from {class Object}[https://docs.ruby-lang.org/en/master/Object.html#class-Object-label-What-27s+Here].
437
+ #
431
438
  # This is a categorized summary of methods and attributes.
432
439
  #
433
440
  # === \Net::HTTP Objects
@@ -492,6 +499,8 @@
492
499
  # Sends a POST request with form data and returns a response object.
493
500
  # - {::post}[rdoc-ref:Net::HTTP.post]:
494
501
  # Sends a POST request with data and returns a response object.
502
+ # - {::put}[rdoc-ref:Net::HTTP.put]:
503
+ # Sends a PUT request with data and returns a response object.
495
504
  # - {#copy}[rdoc-ref:Net::HTTP#copy]:
496
505
  # Sends a COPY request and returns a response object.
497
506
  # - {#delete}[rdoc-ref:Net::HTTP#delete]:
@@ -691,7 +700,7 @@
691
700
  # - {#set_debug_output}[rdoc-ref:Net::HTTP#set_debug_output]:
692
701
  # Sets the output stream for debugging.
693
702
  #
694
- # source://net-http//lib/net/http.rb#722
703
+ # source://net-http//lib/net/http.rb#730
695
704
  class Net::HTTP < ::Net::Protocol
696
705
  # Creates a new \Net::HTTP object for the specified server address,
697
706
  # without opening the TCP connection or initializing the \HTTP session.
@@ -699,7 +708,7 @@ class Net::HTTP < ::Net::Protocol
699
708
  #
700
709
  # @return [HTTP] a new instance of HTTP
701
710
  #
702
- # source://net-http//lib/net/http.rb#1093
711
+ # source://net-http//lib/net/http.rb#1154
703
712
  def initialize(address, port = T.unsafe(nil)); end
704
713
 
705
714
  # Returns +true+ if the \HTTP session has been started:
@@ -718,86 +727,86 @@ class Net::HTTP < ::Net::Protocol
718
727
  #
719
728
  # @return [Boolean]
720
729
  #
721
- # source://net-http//lib/net/http.rb#1413
730
+ # source://net-http//lib/net/http.rb#1490
722
731
  def active?; end
723
732
 
724
733
  # Returns the string host name or host IP given as argument +address+ in ::new.
725
734
  #
726
- # source://net-http//lib/net/http.rb#1194
735
+ # source://net-http//lib/net/http.rb#1270
727
736
  def address; end
728
737
 
729
738
  # Sets or returns the path to a CA certification file in PEM format.
730
739
  #
731
- # source://net-http//lib/net/http.rb#1479
740
+ # source://net-http//lib/net/http.rb#1541
732
741
  def ca_file; end
733
742
 
734
743
  # Sets or returns the path to a CA certification file in PEM format.
735
744
  #
736
- # source://net-http//lib/net/http.rb#1479
745
+ # source://net-http//lib/net/http.rb#1541
737
746
  def ca_file=(_arg0); end
738
747
 
739
748
  # Sets or returns the path of to CA directory
740
749
  # containing certification files in PEM format.
741
750
  #
742
- # source://net-http//lib/net/http.rb#1483
751
+ # source://net-http//lib/net/http.rb#1545
743
752
  def ca_path; end
744
753
 
745
754
  # Sets or returns the path of to CA directory
746
755
  # containing certification files in PEM format.
747
756
  #
748
- # source://net-http//lib/net/http.rb#1483
757
+ # source://net-http//lib/net/http.rb#1545
749
758
  def ca_path=(_arg0); end
750
759
 
751
760
  # Sets or returns the OpenSSL::X509::Certificate object
752
761
  # to be used for client certification.
753
762
  #
754
- # source://net-http//lib/net/http.rb#1487
763
+ # source://net-http//lib/net/http.rb#1549
755
764
  def cert; end
756
765
 
757
766
  # Sets or returns the OpenSSL::X509::Certificate object
758
767
  # to be used for client certification.
759
768
  #
760
- # source://net-http//lib/net/http.rb#1487
769
+ # source://net-http//lib/net/http.rb#1549
761
770
  def cert=(_arg0); end
762
771
 
763
772
  # Sets or returns the X509::Store to be used for verifying peer certificate.
764
773
  #
765
- # source://net-http//lib/net/http.rb#1490
774
+ # source://net-http//lib/net/http.rb#1552
766
775
  def cert_store; end
767
776
 
768
777
  # Sets or returns the X509::Store to be used for verifying peer certificate.
769
778
  #
770
- # source://net-http//lib/net/http.rb#1490
779
+ # source://net-http//lib/net/http.rb#1552
771
780
  def cert_store=(_arg0); end
772
781
 
773
782
  # Sets or returns the available SSL ciphers.
774
783
  # See {OpenSSL::SSL::SSLContext#ciphers=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-ciphers-3D].
775
784
  #
776
- # source://net-http//lib/net/http.rb#1494
785
+ # source://net-http//lib/net/http.rb#1556
777
786
  def ciphers; end
778
787
 
779
788
  # Sets or returns the available SSL ciphers.
780
789
  # See {OpenSSL::SSL::SSLContext#ciphers=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-ciphers-3D].
781
790
  #
782
- # source://net-http//lib/net/http.rb#1494
791
+ # source://net-http//lib/net/http.rb#1556
783
792
  def ciphers=(_arg0); end
784
793
 
785
794
  # Sets or returns whether to close the connection when the response is empty;
786
795
  # initially +false+.
787
796
  #
788
- # source://net-http//lib/net/http.rb#1421
797
+ # source://net-http//lib/net/http.rb#1498
789
798
  def close_on_empty_response; end
790
799
 
791
800
  # Sets or returns whether to close the connection when the response is empty;
792
801
  # initially +false+.
793
802
  #
794
- # source://net-http//lib/net/http.rb#1421
803
+ # source://net-http//lib/net/http.rb#1498
795
804
  def close_on_empty_response=(_arg0); end
796
805
 
797
806
  # Returns the continue timeout value;
798
807
  # see continue_timeout=.
799
808
  #
800
- # source://net-http//lib/net/http.rb#1374
809
+ # source://net-http//lib/net/http.rb#1451
801
810
  def continue_timeout; end
802
811
 
803
812
  # Sets the continue timeout value,
@@ -805,7 +814,7 @@ class Net::HTTP < ::Net::Protocol
805
814
  # If the \HTTP object does not receive a response in this many seconds
806
815
  # it sends the request body.
807
816
  #
808
- # source://net-http//lib/net/http.rb#1380
817
+ # source://net-http//lib/net/http.rb#1457
809
818
  def continue_timeout=(sec); end
810
819
 
811
820
  # Sends a COPY request to the server;
@@ -817,7 +826,7 @@ class Net::HTTP < ::Net::Protocol
817
826
  # http = Net::HTTP.new(hostname)
818
827
  # http.copy('/todos/1')
819
828
  #
820
- # source://net-http//lib/net/http.rb#2123
829
+ # source://net-http//lib/net/http.rb#2201
821
830
  def copy(path, initheader = T.unsafe(nil)); end
822
831
 
823
832
  # Sends a DELETE request to the server;
@@ -829,19 +838,19 @@ class Net::HTTP < ::Net::Protocol
829
838
  # http = Net::HTTP.new(hostname)
830
839
  # http.delete('/todos/1')
831
840
  #
832
- # source://net-http//lib/net/http.rb#2097
841
+ # source://net-http//lib/net/http.rb#2175
833
842
  def delete(path, initheader = T.unsafe(nil)); end
834
843
 
835
844
  # Sets or returns the extra X509 certificates to be added to the certificate chain.
836
845
  # See {OpenSSL::SSL::SSLContext#add_certificate}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-add_certificate].
837
846
  #
838
- # source://net-http//lib/net/http.rb#1498
847
+ # source://net-http//lib/net/http.rb#1560
839
848
  def extra_chain_cert; end
840
849
 
841
850
  # Sets or returns the extra X509 certificates to be added to the certificate chain.
842
851
  # See {OpenSSL::SSL::SSLContext#add_certificate}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-add_certificate].
843
852
  #
844
- # source://net-http//lib/net/http.rb#1498
853
+ # source://net-http//lib/net/http.rb#1560
845
854
  def extra_chain_cert=(_arg0); end
846
855
 
847
856
  # Finishes the \HTTP session:
@@ -856,7 +865,7 @@ class Net::HTTP < ::Net::Protocol
856
865
  #
857
866
  # @raise [IOError]
858
867
  #
859
- # source://net-http//lib/net/http.rb#1708
868
+ # source://net-http//lib/net/http.rb#1776
860
869
  def finish; end
861
870
 
862
871
  # :call-seq:
@@ -888,7 +897,7 @@ class Net::HTTP < ::Net::Protocol
888
897
  # - Net::HTTP::Get: request class for \HTTP method GET.
889
898
  # - Net::HTTP.get: sends GET request, returns response body.
890
899
  #
891
- # source://net-http//lib/net/http.rb#1914
900
+ # source://net-http//lib/net/http.rb#1987
892
901
  def get(path, initheader = T.unsafe(nil), dest = T.unsafe(nil), &block); end
893
902
 
894
903
  # Sends a GET request to the server;
@@ -913,7 +922,7 @@ class Net::HTTP < ::Net::Protocol
913
922
  #
914
923
  # #<Net::HTTPOK 200 OK readbody=false>
915
924
  #
916
- # source://net-http//lib/net/http.rb#2176
925
+ # source://net-http//lib/net/http.rb#2254
917
926
  def get2(path, initheader = T.unsafe(nil), &block); end
918
927
 
919
928
  # Sends a HEAD request to the server;
@@ -930,7 +939,7 @@ class Net::HTTP < ::Net::Protocol
930
939
  # ["content-type", ["application/json; charset=utf-8"]],
931
940
  # ["connection", ["close"]]]
932
941
  #
933
- # source://net-http//lib/net/http.rb#1938
942
+ # source://net-http//lib/net/http.rb#2011
934
943
  def head(path, initheader = T.unsafe(nil)); end
935
944
 
936
945
  # Sends a HEAD request to the server;
@@ -942,21 +951,21 @@ class Net::HTTP < ::Net::Protocol
942
951
  # http = Net::HTTP.new(hostname)
943
952
  # http.head('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
944
953
  #
945
- # source://net-http//lib/net/http.rb#2189
954
+ # source://net-http//lib/net/http.rb#2267
946
955
  def head2(path, initheader = T.unsafe(nil), &block); end
947
956
 
948
957
  # Sets or returns whether to ignore end-of-file when reading a response body
949
958
  # with <tt>Content-Length</tt> headers;
950
959
  # initially +true+.
951
960
  #
952
- # source://net-http//lib/net/http.rb#1397
961
+ # source://net-http//lib/net/http.rb#1474
953
962
  def ignore_eof; end
954
963
 
955
964
  # Sets or returns whether to ignore end-of-file when reading a response body
956
965
  # with <tt>Content-Length</tt> headers;
957
966
  # initially +true+.
958
967
  #
959
- # source://net-http//lib/net/http.rb#1397
968
+ # source://net-http//lib/net/http.rb#1474
960
969
  def ignore_eof=(_arg0); end
961
970
 
962
971
  # Returns a string representation of +self+:
@@ -964,7 +973,7 @@ class Net::HTTP < ::Net::Protocol
964
973
  # Net::HTTP.new(hostname).inspect
965
974
  # # => "#<Net::HTTP jsonplaceholder.typicode.com:80 open=false>"
966
975
  #
967
- # source://net-http//lib/net/http.rb#1135
976
+ # source://net-http//lib/net/http.rb#1211
968
977
  def inspect; end
969
978
 
970
979
  # Returns the IP address for the connection.
@@ -986,7 +995,7 @@ class Net::HTTP < ::Net::Protocol
986
995
  # http.ipaddr # => "172.67.155.76"
987
996
  # http.finish
988
997
  #
989
- # source://net-http//lib/net/http.rb#1274
998
+ # source://net-http//lib/net/http.rb#1351
990
999
  def ipaddr; end
991
1000
 
992
1001
  # Sets the IP address for the connection:
@@ -1000,7 +1009,7 @@ class Net::HTTP < ::Net::Protocol
1000
1009
  #
1001
1010
  # @raise [IOError]
1002
1011
  #
1003
- # source://net-http//lib/net/http.rb#1286
1012
+ # source://net-http//lib/net/http.rb#1363
1004
1013
  def ipaddr=(addr); end
1005
1014
 
1006
1015
  # Sets or returns the numeric (\Integer or \Float) number of seconds
@@ -1011,7 +1020,7 @@ class Net::HTTP < ::Net::Protocol
1011
1020
  # otherwise the connection will have been closed
1012
1021
  # and a new connection is opened.
1013
1022
  #
1014
- # source://net-http//lib/net/http.rb#1392
1023
+ # source://net-http//lib/net/http.rb#1469
1015
1024
  def keep_alive_timeout; end
1016
1025
 
1017
1026
  # Sets or returns the numeric (\Integer or \Float) number of seconds
@@ -1022,41 +1031,41 @@ class Net::HTTP < ::Net::Protocol
1022
1031
  # otherwise the connection will have been closed
1023
1032
  # and a new connection is opened.
1024
1033
  #
1025
- # source://net-http//lib/net/http.rb#1392
1034
+ # source://net-http//lib/net/http.rb#1469
1026
1035
  def keep_alive_timeout=(_arg0); end
1027
1036
 
1028
1037
  # Sets or returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
1029
1038
  #
1030
- # source://net-http//lib/net/http.rb#1501
1039
+ # source://net-http//lib/net/http.rb#1563
1031
1040
  def key; end
1032
1041
 
1033
1042
  # Sets or returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
1034
1043
  #
1035
- # source://net-http//lib/net/http.rb#1501
1044
+ # source://net-http//lib/net/http.rb#1563
1036
1045
  def key=(_arg0); end
1037
1046
 
1038
1047
  # Sets or returns the string local host used to establish the connection;
1039
1048
  # initially +nil+.
1040
1049
  #
1041
- # source://net-http//lib/net/http.rb#1201
1050
+ # source://net-http//lib/net/http.rb#1277
1042
1051
  def local_host; end
1043
1052
 
1044
1053
  # Sets or returns the string local host used to establish the connection;
1045
1054
  # initially +nil+.
1046
1055
  #
1047
- # source://net-http//lib/net/http.rb#1201
1056
+ # source://net-http//lib/net/http.rb#1277
1048
1057
  def local_host=(_arg0); end
1049
1058
 
1050
1059
  # Sets or returns the integer local port used to establish the connection;
1051
1060
  # initially +nil+.
1052
1061
  #
1053
- # source://net-http//lib/net/http.rb#1205
1062
+ # source://net-http//lib/net/http.rb#1281
1054
1063
  def local_port; end
1055
1064
 
1056
1065
  # Sets or returns the integer local port used to establish the connection;
1057
1066
  # initially +nil+.
1058
1067
  #
1059
- # source://net-http//lib/net/http.rb#1205
1068
+ # source://net-http//lib/net/http.rb#1281
1060
1069
  def local_port=(_arg0); end
1061
1070
 
1062
1071
  # Sends a LOCK request to the server;
@@ -1069,13 +1078,13 @@ class Net::HTTP < ::Net::Protocol
1069
1078
  # http = Net::HTTP.new(hostname)
1070
1079
  # http.lock('/todos/1', data)
1071
1080
  #
1072
- # source://net-http//lib/net/http.rb#2043
1081
+ # source://net-http//lib/net/http.rb#2121
1073
1082
  def lock(path, body, initheader = T.unsafe(nil)); end
1074
1083
 
1075
1084
  # Returns the maximum number of times to retry an idempotent request;
1076
1085
  # see #max_retries=.
1077
1086
  #
1078
- # source://net-http//lib/net/http.rb#1330
1087
+ # source://net-http//lib/net/http.rb#1407
1079
1088
  def max_retries; end
1080
1089
 
1081
1090
  # Sets the maximum number of times to retry an idempotent request in case of
@@ -1090,31 +1099,31 @@ class Net::HTTP < ::Net::Protocol
1090
1099
  # http.max_retries = 2 # => 2
1091
1100
  # http.max_retries # => 2
1092
1101
  #
1093
- # source://net-http//lib/net/http.rb#1320
1102
+ # source://net-http//lib/net/http.rb#1397
1094
1103
  def max_retries=(retries); end
1095
1104
 
1096
1105
  # Sets or returns the maximum SSL version.
1097
1106
  # See {OpenSSL::SSL::SSLContext#max_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-max_version-3D].
1098
1107
  #
1099
- # source://net-http//lib/net/http.rb#1516
1108
+ # source://net-http//lib/net/http.rb#1578
1100
1109
  def max_version; end
1101
1110
 
1102
1111
  # Sets or returns the maximum SSL version.
1103
1112
  # See {OpenSSL::SSL::SSLContext#max_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-max_version-3D].
1104
1113
  #
1105
- # source://net-http//lib/net/http.rb#1516
1114
+ # source://net-http//lib/net/http.rb#1578
1106
1115
  def max_version=(_arg0); end
1107
1116
 
1108
1117
  # Sets or returns the minimum SSL version.
1109
1118
  # See {OpenSSL::SSL::SSLContext#min_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-min_version-3D].
1110
1119
  #
1111
- # source://net-http//lib/net/http.rb#1512
1120
+ # source://net-http//lib/net/http.rb#1574
1112
1121
  def min_version; end
1113
1122
 
1114
1123
  # Sets or returns the minimum SSL version.
1115
1124
  # See {OpenSSL::SSL::SSLContext#min_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-min_version-3D].
1116
1125
  #
1117
- # source://net-http//lib/net/http.rb#1512
1126
+ # source://net-http//lib/net/http.rb#1574
1118
1127
  def min_version=(_arg0); end
1119
1128
 
1120
1129
  # Sends a MKCOL request to the server;
@@ -1127,7 +1136,7 @@ class Net::HTTP < ::Net::Protocol
1127
1136
  # http.mkcol('/todos/1', data)
1128
1137
  # http = Net::HTTP.new(hostname)
1129
1138
  #
1130
- # source://net-http//lib/net/http.rb#2137
1139
+ # source://net-http//lib/net/http.rb#2215
1131
1140
  def mkcol(path, body = T.unsafe(nil), initheader = T.unsafe(nil)); end
1132
1141
 
1133
1142
  # Sends a MOVE request to the server;
@@ -1139,7 +1148,7 @@ class Net::HTTP < ::Net::Protocol
1139
1148
  # http = Net::HTTP.new(hostname)
1140
1149
  # http.move('/todos/1')
1141
1150
  #
1142
- # source://net-http//lib/net/http.rb#2110
1151
+ # source://net-http//lib/net/http.rb#2188
1143
1152
  def move(path, initheader = T.unsafe(nil)); end
1144
1153
 
1145
1154
  # Sets or returns the numeric (\Integer or \Float) number of seconds
@@ -1148,7 +1157,7 @@ class Net::HTTP < ::Net::Protocol
1148
1157
  # If the connection is not made in the given interval,
1149
1158
  # an exception is raised.
1150
1159
  #
1151
- # source://net-http//lib/net/http.rb#1296
1160
+ # source://net-http//lib/net/http.rb#1373
1152
1161
  def open_timeout; end
1153
1162
 
1154
1163
  # Sets or returns the numeric (\Integer or \Float) number of seconds
@@ -1157,7 +1166,7 @@ class Net::HTTP < ::Net::Protocol
1157
1166
  # If the connection is not made in the given interval,
1158
1167
  # an exception is raised.
1159
1168
  #
1160
- # source://net-http//lib/net/http.rb#1296
1169
+ # source://net-http//lib/net/http.rb#1373
1161
1170
  def open_timeout=(_arg0); end
1162
1171
 
1163
1172
  # Sends an Options request to the server;
@@ -1169,7 +1178,7 @@ class Net::HTTP < ::Net::Protocol
1169
1178
  # http = Net::HTTP.new(hostname)
1170
1179
  # http.options('/')
1171
1180
  #
1172
- # source://net-http//lib/net/http.rb#2070
1181
+ # source://net-http//lib/net/http.rb#2148
1173
1182
  def options(path, initheader = T.unsafe(nil)); end
1174
1183
 
1175
1184
  # :call-seq:
@@ -1197,19 +1206,19 @@ class Net::HTTP < ::Net::Protocol
1197
1206
  #
1198
1207
  # http.patch('/todos/1', data) # => #<Net::HTTPCreated 201 Created readbody=true>
1199
1208
  #
1200
- # source://net-http//lib/net/http.rb#2001
1209
+ # source://net-http//lib/net/http.rb#2074
1201
1210
  def patch(path, data, initheader = T.unsafe(nil), dest = T.unsafe(nil), &block); end
1202
1211
 
1203
1212
  # Returns the X509 certificate chain (an array of strings)
1204
1213
  # for the session's socket peer,
1205
1214
  # or +nil+ if none.
1206
1215
  #
1207
- # source://net-http//lib/net/http.rb#1537
1216
+ # source://net-http//lib/net/http.rb#1599
1208
1217
  def peer_cert; end
1209
1218
 
1210
1219
  # Returns the integer port number given as argument +port+ in ::new.
1211
1220
  #
1212
- # source://net-http//lib/net/http.rb#1197
1221
+ # source://net-http//lib/net/http.rb#1273
1213
1222
  def port; end
1214
1223
 
1215
1224
  # :call-seq:
@@ -1242,7 +1251,7 @@ class Net::HTTP < ::Net::Protocol
1242
1251
  # - Net::HTTP::Post: request class for \HTTP method POST.
1243
1252
  # - Net::HTTP.post: sends POST request, returns response body.
1244
1253
  #
1245
- # source://net-http//lib/net/http.rb#1972
1254
+ # source://net-http//lib/net/http.rb#2045
1246
1255
  def post(path, data, initheader = T.unsafe(nil), dest = T.unsafe(nil), &block); end
1247
1256
 
1248
1257
  # Sends a POST request to the server;
@@ -1268,7 +1277,7 @@ class Net::HTTP < ::Net::Protocol
1268
1277
  #
1269
1278
  # "{\n \"xyzzy\": \"\",\n \"id\": 201\n}"
1270
1279
  #
1271
- # source://net-http//lib/net/http.rb#2216
1280
+ # source://net-http//lib/net/http.rb#2294
1272
1281
  def post2(path, data, initheader = T.unsafe(nil), &block); end
1273
1282
 
1274
1283
  # Sends a PROPFIND request to the server;
@@ -1281,7 +1290,7 @@ class Net::HTTP < ::Net::Protocol
1281
1290
  # http = Net::HTTP.new(hostname)
1282
1291
  # http.propfind('/todos/1', data)
1283
1292
  #
1284
- # source://net-http//lib/net/http.rb#2084
1293
+ # source://net-http//lib/net/http.rb#2162
1285
1294
  def propfind(path, body = T.unsafe(nil), initheader = T.unsafe(nil)); end
1286
1295
 
1287
1296
  # Sends a PROPPATCH request to the server;
@@ -1294,7 +1303,7 @@ class Net::HTTP < ::Net::Protocol
1294
1303
  # http = Net::HTTP.new(hostname)
1295
1304
  # http.proppatch('/todos/1', data)
1296
1305
  #
1297
- # source://net-http//lib/net/http.rb#2029
1306
+ # source://net-http//lib/net/http.rb#2107
1298
1307
  def proppatch(path, body, initheader = T.unsafe(nil)); end
1299
1308
 
1300
1309
  # Returns +true+ if a proxy server is defined, +false+ otherwise;
@@ -1302,26 +1311,26 @@ class Net::HTTP < ::Net::Protocol
1302
1311
  #
1303
1312
  # @return [Boolean]
1304
1313
  #
1305
- # source://net-http//lib/net/http.rb#1785
1314
+ # source://net-http//lib/net/http.rb#1858
1306
1315
  def proxy?; end
1307
1316
 
1308
1317
  # Returns the address of the proxy server, if defined, +nil+ otherwise;
1309
1318
  # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1310
1319
  #
1311
- # source://net-http//lib/net/http.rb#1807
1320
+ # source://net-http//lib/net/http.rb#1880
1312
1321
  def proxy_address; end
1313
1322
 
1314
1323
  # Sets the proxy address;
1315
1324
  # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1316
1325
  #
1317
- # source://net-http//lib/net/http.rb#1241
1326
+ # source://net-http//lib/net/http.rb#1317
1318
1327
  def proxy_address=(_arg0); end
1319
1328
 
1320
1329
  # Sets whether to determine the proxy from environment variable
1321
1330
  # '<tt>ENV['http_proxy']</tt>';
1322
1331
  # see {Proxy Using ENV['http_proxy']}[rdoc-ref:Net::HTTP@Proxy+Using+-27ENV-5B-27http_proxy-27-5D-27].
1323
1332
  #
1324
- # source://net-http//lib/net/http.rb#1237
1333
+ # source://net-http//lib/net/http.rb#1313
1325
1334
  def proxy_from_env=(_arg0); end
1326
1335
 
1327
1336
  # Returns +true+ if the proxy server is defined in the environment,
@@ -1330,60 +1339,67 @@ class Net::HTTP < ::Net::Protocol
1330
1339
  #
1331
1340
  # @return [Boolean]
1332
1341
  #
1333
- # source://net-http//lib/net/http.rb#1792
1342
+ # source://net-http//lib/net/http.rb#1865
1334
1343
  def proxy_from_env?; end
1335
1344
 
1336
1345
  # Returns the password of the proxy server, if defined, +nil+ otherwise;
1337
1346
  # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1338
1347
  #
1339
- # source://net-http//lib/net/http.rb#1838
1348
+ # source://net-http//lib/net/http.rb#1911
1340
1349
  def proxy_pass; end
1341
1350
 
1342
1351
  # Sets the proxy password;
1343
1352
  # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1344
1353
  #
1345
- # source://net-http//lib/net/http.rb#1253
1354
+ # source://net-http//lib/net/http.rb#1329
1346
1355
  def proxy_pass=(_arg0); end
1347
1356
 
1348
1357
  # Returns the port number of the proxy server, if defined, +nil+ otherwise;
1349
1358
  # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1350
1359
  #
1351
- # source://net-http//lib/net/http.rb#1817
1360
+ # source://net-http//lib/net/http.rb#1890
1352
1361
  def proxy_port; end
1353
1362
 
1354
1363
  # Sets the proxy port;
1355
1364
  # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1356
1365
  #
1357
- # source://net-http//lib/net/http.rb#1245
1366
+ # source://net-http//lib/net/http.rb#1321
1358
1367
  def proxy_port=(_arg0); end
1359
1368
 
1360
1369
  # The proxy URI determined from the environment for this connection.
1361
1370
  #
1362
- # source://net-http//lib/net/http.rb#1797
1371
+ # source://net-http//lib/net/http.rb#1870
1363
1372
  def proxy_uri; end
1364
1373
 
1374
+ # Sets the attribute proxy_use_ssl
1375
+ #
1376
+ # @param value the value to set the attribute proxy_use_ssl to.
1377
+ #
1378
+ # source://net-http//lib/net/http.rb#1330
1379
+ def proxy_use_ssl=(_arg0); end
1380
+
1365
1381
  # Returns the user name of the proxy server, if defined, +nil+ otherwise;
1366
1382
  # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1367
1383
  #
1368
- # source://net-http//lib/net/http.rb#1827
1384
+ # source://net-http//lib/net/http.rb#1900
1369
1385
  def proxy_user; end
1370
1386
 
1371
1387
  # Sets the proxy user;
1372
1388
  # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1373
1389
  #
1374
- # source://net-http//lib/net/http.rb#1249
1390
+ # source://net-http//lib/net/http.rb#1325
1375
1391
  def proxy_user=(_arg0); end
1376
1392
 
1377
1393
  # Returns the address of the proxy server, if defined, +nil+ otherwise;
1378
1394
  # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1379
1395
  #
1380
- # source://net-http//lib/net/http.rb#1807
1396
+ # source://net-http//lib/net/http.rb#1880
1381
1397
  def proxyaddr; end
1382
1398
 
1383
1399
  # Returns the port number of the proxy server, if defined, +nil+ otherwise;
1384
1400
  # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1385
1401
  #
1386
- # source://net-http//lib/net/http.rb#1817
1402
+ # source://net-http//lib/net/http.rb#1890
1387
1403
  def proxyport; end
1388
1404
 
1389
1405
  # Sends a PUT request to the server;
@@ -1396,7 +1412,12 @@ class Net::HTTP < ::Net::Protocol
1396
1412
  # http = Net::HTTP.new(hostname)
1397
1413
  # http.put('/todos/1', data) # => #<Net::HTTPOK 200 OK readbody=true>
1398
1414
  #
1399
- # source://net-http//lib/net/http.rb#2015
1415
+ # Related:
1416
+ #
1417
+ # - Net::HTTP::Put: request class for \HTTP method PUT.
1418
+ # - Net::HTTP.put: sends PUT request, returns response body.
1419
+ #
1420
+ # source://net-http//lib/net/http.rb#2093
1400
1421
  def put(path, data, initheader = T.unsafe(nil)); end
1401
1422
 
1402
1423
  # Sends a PUT request to the server;
@@ -1409,14 +1430,14 @@ class Net::HTTP < ::Net::Protocol
1409
1430
  # http.put('/todos/1', 'xyzzy')
1410
1431
  # # => #<Net::HTTPOK 200 OK readbody=true>
1411
1432
  #
1412
- # source://net-http//lib/net/http.rb#2230
1433
+ # source://net-http//lib/net/http.rb#2308
1413
1434
  def put2(path, data, initheader = T.unsafe(nil), &block); end
1414
1435
 
1415
1436
  # Returns the numeric (\Integer or \Float) number of seconds
1416
1437
  # to wait for one block to be read (via one read(2) call);
1417
1438
  # see #read_timeout=.
1418
1439
  #
1419
- # source://net-http//lib/net/http.rb#1301
1440
+ # source://net-http//lib/net/http.rb#1378
1420
1441
  def read_timeout; end
1421
1442
 
1422
1443
  # Sets the read timeout, in seconds, for +self+ to integer +sec+;
@@ -1430,7 +1451,7 @@ class Net::HTTP < ::Net::Protocol
1430
1451
  # http.read_timeout = 0
1431
1452
  # http.get('/todos/1') # Raises Net::ReadTimeout.
1432
1453
  #
1433
- # source://net-http//lib/net/http.rb#1343
1454
+ # source://net-http//lib/net/http.rb#1420
1434
1455
  def read_timeout=(sec); end
1435
1456
 
1436
1457
  # Sends the given request +req+ to the server;
@@ -1463,7 +1484,7 @@ class Net::HTTP < ::Net::Protocol
1463
1484
  #
1464
1485
  # #<Net::HTTPOK 200 OK readbody=false>
1465
1486
  #
1466
- # source://net-http//lib/net/http.rb#2295
1487
+ # source://net-http//lib/net/http.rb#2373
1467
1488
  def request(req, body = T.unsafe(nil), &block); end
1468
1489
 
1469
1490
  # Sends a GET request to the server;
@@ -1488,7 +1509,7 @@ class Net::HTTP < ::Net::Protocol
1488
1509
  #
1489
1510
  # #<Net::HTTPOK 200 OK readbody=false>
1490
1511
  #
1491
- # source://net-http//lib/net/http.rb#2176
1512
+ # source://net-http//lib/net/http.rb#2254
1492
1513
  def request_get(path, initheader = T.unsafe(nil), &block); end
1493
1514
 
1494
1515
  # Sends a HEAD request to the server;
@@ -1500,7 +1521,7 @@ class Net::HTTP < ::Net::Protocol
1500
1521
  # http = Net::HTTP.new(hostname)
1501
1522
  # http.head('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
1502
1523
  #
1503
- # source://net-http//lib/net/http.rb#2189
1524
+ # source://net-http//lib/net/http.rb#2267
1504
1525
  def request_head(path, initheader = T.unsafe(nil), &block); end
1505
1526
 
1506
1527
  # Sends a POST request to the server;
@@ -1526,7 +1547,7 @@ class Net::HTTP < ::Net::Protocol
1526
1547
  #
1527
1548
  # "{\n \"xyzzy\": \"\",\n \"id\": 201\n}"
1528
1549
  #
1529
- # source://net-http//lib/net/http.rb#2216
1550
+ # source://net-http//lib/net/http.rb#2294
1530
1551
  def request_post(path, data, initheader = T.unsafe(nil), &block); end
1531
1552
 
1532
1553
  # Sends a PUT request to the server;
@@ -1539,13 +1560,13 @@ class Net::HTTP < ::Net::Protocol
1539
1560
  # http.put('/todos/1', 'xyzzy')
1540
1561
  # # => #<Net::HTTPOK 200 OK readbody=true>
1541
1562
  #
1542
- # source://net-http//lib/net/http.rb#2230
1563
+ # source://net-http//lib/net/http.rb#2308
1543
1564
  def request_put(path, data, initheader = T.unsafe(nil), &block); end
1544
1565
 
1545
1566
  # Returns the encoding to use for the response body;
1546
1567
  # see #response_body_encoding=.
1547
1568
  #
1548
- # source://net-http//lib/net/http.rb#1209
1569
+ # source://net-http//lib/net/http.rb#1285
1549
1570
  def response_body_encoding; end
1550
1571
 
1551
1572
  # Sets the encoding to be used for the response body;
@@ -1566,7 +1587,7 @@ class Net::HTTP < ::Net::Protocol
1566
1587
  # http.response_body_encoding = 'US-ASCII' # => "US-ASCII"
1567
1588
  # http.response_body_encoding = 'ASCII' # => "ASCII"
1568
1589
  #
1569
- # source://net-http//lib/net/http.rb#1229
1590
+ # source://net-http//lib/net/http.rb#1305
1570
1591
  def response_body_encoding=(value); end
1571
1592
 
1572
1593
  # Sends an \HTTP request to the server;
@@ -1589,7 +1610,7 @@ class Net::HTTP < ::Net::Protocol
1589
1610
  # http.send_request('POST', '/todos', 'xyzzy')
1590
1611
  # # => #<Net::HTTPCreated 201 Created readbody=true>
1591
1612
  #
1592
- # source://net-http//lib/net/http.rb#2259
1613
+ # source://net-http//lib/net/http.rb#2337
1593
1614
  def send_request(name, path, data = T.unsafe(nil), header = T.unsafe(nil)); end
1594
1615
 
1595
1616
  # *WARNING* This method opens a serious security hole.
@@ -1641,29 +1662,29 @@ class Net::HTTP < ::Net::Protocol
1641
1662
  # read 2 bytes
1642
1663
  # Conn keep-alive
1643
1664
  #
1644
- # source://net-http//lib/net/http.rb#1188
1665
+ # source://net-http//lib/net/http.rb#1264
1645
1666
  def set_debug_output(output); end
1646
1667
 
1647
1668
  # Sets or returns the SSL timeout seconds.
1648
1669
  #
1649
- # source://net-http//lib/net/http.rb#1504
1670
+ # source://net-http//lib/net/http.rb#1566
1650
1671
  def ssl_timeout; end
1651
1672
 
1652
1673
  # Sets or returns the SSL timeout seconds.
1653
1674
  #
1654
- # source://net-http//lib/net/http.rb#1504
1675
+ # source://net-http//lib/net/http.rb#1566
1655
1676
  def ssl_timeout=(_arg0); end
1656
1677
 
1657
1678
  # Sets or returns the SSL version.
1658
1679
  # See {OpenSSL::SSL::SSLContext#ssl_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-ssl_version-3D].
1659
1680
  #
1660
- # source://net-http//lib/net/http.rb#1508
1681
+ # source://net-http//lib/net/http.rb#1570
1661
1682
  def ssl_version; end
1662
1683
 
1663
1684
  # Sets or returns the SSL version.
1664
1685
  # See {OpenSSL::SSL::SSLContext#ssl_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-ssl_version-3D].
1665
1686
  #
1666
- # source://net-http//lib/net/http.rb#1508
1687
+ # source://net-http//lib/net/http.rb#1570
1667
1688
  def ssl_version=(_arg0); end
1668
1689
 
1669
1690
  # Starts an \HTTP session.
@@ -1689,7 +1710,7 @@ class Net::HTTP < ::Net::Protocol
1689
1710
  #
1690
1711
  # @raise [IOError]
1691
1712
  #
1692
- # source://net-http//lib/net/http.rb#1565
1713
+ # source://net-http//lib/net/http.rb#1627
1693
1714
  def start; end
1694
1715
 
1695
1716
  # Returns +true+ if the \HTTP session has been started:
@@ -1708,7 +1729,7 @@ class Net::HTTP < ::Net::Protocol
1708
1729
  #
1709
1730
  # @return [Boolean]
1710
1731
  #
1711
- # source://net-http//lib/net/http.rb#1413
1732
+ # source://net-http//lib/net/http.rb#1490
1712
1733
  def started?; end
1713
1734
 
1714
1735
  # Sends a TRACE request to the server;
@@ -1720,7 +1741,7 @@ class Net::HTTP < ::Net::Protocol
1720
1741
  # http = Net::HTTP.new(hostname)
1721
1742
  # http.trace('/todos/1')
1722
1743
  #
1723
- # source://net-http//lib/net/http.rb#2150
1744
+ # source://net-http//lib/net/http.rb#2228
1724
1745
  def trace(path, initheader = T.unsafe(nil)); end
1725
1746
 
1726
1747
  # Sends an UNLOCK request to the server;
@@ -1733,7 +1754,7 @@ class Net::HTTP < ::Net::Protocol
1733
1754
  # http = Net::HTTP.new(hostname)
1734
1755
  # http.unlock('/todos/1', data)
1735
1756
  #
1736
- # source://net-http//lib/net/http.rb#2057
1757
+ # source://net-http//lib/net/http.rb#2135
1737
1758
  def unlock(path, body, initheader = T.unsafe(nil)); end
1738
1759
 
1739
1760
  # Sets whether a new session is to use
@@ -1743,7 +1764,7 @@ class Net::HTTP < ::Net::Protocol
1743
1764
  #
1744
1765
  # Raises OpenSSL::SSL::SSLError if the port is not an HTTPS port.
1745
1766
  #
1746
- # source://net-http//lib/net/http.rb#1435
1767
+ # source://net-http//lib/net/http.rb#1512
1747
1768
  def use_ssl=(flag); end
1748
1769
 
1749
1770
  # Returns +true+ if +self+ uses SSL, +false+ otherwise.
@@ -1751,62 +1772,62 @@ class Net::HTTP < ::Net::Protocol
1751
1772
  #
1752
1773
  # @return [Boolean]
1753
1774
  #
1754
- # source://net-http//lib/net/http.rb#1425
1775
+ # source://net-http//lib/net/http.rb#1502
1755
1776
  def use_ssl?; end
1756
1777
 
1757
1778
  # Sets or returns the callback for the server certification verification.
1758
1779
  #
1759
- # source://net-http//lib/net/http.rb#1519
1780
+ # source://net-http//lib/net/http.rb#1581
1760
1781
  def verify_callback; end
1761
1782
 
1762
1783
  # Sets or returns the callback for the server certification verification.
1763
1784
  #
1764
- # source://net-http//lib/net/http.rb#1519
1785
+ # source://net-http//lib/net/http.rb#1581
1765
1786
  def verify_callback=(_arg0); end
1766
1787
 
1767
1788
  # Sets or returns the maximum depth for the certificate chain verification.
1768
1789
  #
1769
- # source://net-http//lib/net/http.rb#1522
1790
+ # source://net-http//lib/net/http.rb#1584
1770
1791
  def verify_depth; end
1771
1792
 
1772
1793
  # Sets or returns the maximum depth for the certificate chain verification.
1773
1794
  #
1774
- # source://net-http//lib/net/http.rb#1522
1795
+ # source://net-http//lib/net/http.rb#1584
1775
1796
  def verify_depth=(_arg0); end
1776
1797
 
1777
1798
  # Sets or returns whether to verify that the server certificate is valid
1778
1799
  # for the hostname.
1779
1800
  # See {OpenSSL::SSL::SSLContext#verify_hostname=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-verify_mode].
1780
1801
  #
1781
- # source://net-http//lib/net/http.rb#1532
1802
+ # source://net-http//lib/net/http.rb#1594
1782
1803
  def verify_hostname; end
1783
1804
 
1784
1805
  # Sets or returns whether to verify that the server certificate is valid
1785
1806
  # for the hostname.
1786
1807
  # See {OpenSSL::SSL::SSLContext#verify_hostname=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-verify_mode].
1787
1808
  #
1788
- # source://net-http//lib/net/http.rb#1532
1809
+ # source://net-http//lib/net/http.rb#1594
1789
1810
  def verify_hostname=(_arg0); end
1790
1811
 
1791
1812
  # Sets or returns the flags for server the certification verification
1792
1813
  # at the beginning of the SSL/TLS session.
1793
1814
  # OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER are acceptable.
1794
1815
  #
1795
- # source://net-http//lib/net/http.rb#1527
1816
+ # source://net-http//lib/net/http.rb#1589
1796
1817
  def verify_mode; end
1797
1818
 
1798
1819
  # Sets or returns the flags for server the certification verification
1799
1820
  # at the beginning of the SSL/TLS session.
1800
1821
  # OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER are acceptable.
1801
1822
  #
1802
- # source://net-http//lib/net/http.rb#1527
1823
+ # source://net-http//lib/net/http.rb#1589
1803
1824
  def verify_mode=(_arg0); end
1804
1825
 
1805
1826
  # Returns the numeric (\Integer or \Float) number of seconds
1806
1827
  # to wait for one block to be written (via one write(2) call);
1807
1828
  # see #write_timeout=.
1808
1829
  #
1809
- # source://net-http//lib/net/http.rb#1306
1830
+ # source://net-http//lib/net/http.rb#1383
1810
1831
  def write_timeout; end
1811
1832
 
1812
1833
  # Sets the write timeout, in seconds, for +self+ to integer +sec+;
@@ -1828,76 +1849,76 @@ class Net::HTTP < ::Net::Protocol
1828
1849
  # http.write_timeout = 0
1829
1850
  # http.post(_uri.path, data, headers) # Raises Net::WriteTimeout.
1830
1851
  #
1831
- # source://net-http//lib/net/http.rb#1367
1852
+ # source://net-http//lib/net/http.rb#1444
1832
1853
  def write_timeout=(sec); end
1833
1854
 
1834
1855
  private
1835
1856
 
1836
1857
  # Adds a message to debugging output
1837
1858
  #
1838
- # source://net-http//lib/net/http.rb#2472
1859
+ # source://net-http//lib/net/http.rb#2553
1839
1860
  def D(msg); end
1840
1861
 
1841
- # source://net-http//lib/net/http.rb#2464
1862
+ # source://net-http//lib/net/http.rb#2545
1842
1863
  def addr_port; end
1843
1864
 
1844
- # source://net-http//lib/net/http.rb#2381
1865
+ # source://net-http//lib/net/http.rb#2462
1845
1866
  def begin_transport(req); end
1846
1867
 
1847
1868
  # without proxy, obsolete
1848
1869
  #
1849
- # source://net-http//lib/net/http.rb#1859
1870
+ # source://net-http//lib/net/http.rb#1932
1850
1871
  def conn_address; end
1851
1872
 
1852
- # source://net-http//lib/net/http.rb#1863
1873
+ # source://net-http//lib/net/http.rb#1936
1853
1874
  def conn_port; end
1854
1875
 
1855
- # source://net-http//lib/net/http.rb#1585
1876
+ # source://net-http//lib/net/http.rb#1647
1856
1877
  def connect; end
1857
1878
 
1858
1879
  # Adds a message to debugging output
1859
1880
  #
1860
- # source://net-http//lib/net/http.rb#2472
1881
+ # source://net-http//lib/net/http.rb#2553
1861
1882
  def debug(msg); end
1862
1883
 
1863
- # source://net-http//lib/net/http.rb#1713
1884
+ # source://net-http//lib/net/http.rb#1781
1864
1885
  def do_finish; end
1865
1886
 
1866
- # source://net-http//lib/net/http.rb#1579
1887
+ # source://net-http//lib/net/http.rb#1641
1867
1888
  def do_start; end
1868
1889
 
1869
- # source://net-http//lib/net/http.rb#1867
1890
+ # source://net-http//lib/net/http.rb#1940
1870
1891
  def edit_path(path); end
1871
1892
 
1872
- # source://net-http//lib/net/http.rb#2404
1893
+ # source://net-http//lib/net/http.rb#2485
1873
1894
  def end_transport(req, res); end
1874
1895
 
1875
1896
  # @return [Boolean]
1876
1897
  #
1877
- # source://net-http//lib/net/http.rb#2421
1898
+ # source://net-http//lib/net/http.rb#2502
1878
1899
  def keep_alive?(req, res); end
1879
1900
 
1880
- # source://net-http//lib/net/http.rb#1695
1901
+ # source://net-http//lib/net/http.rb#1763
1881
1902
  def on_connect; end
1882
1903
 
1883
1904
  # Executes a request which uses a representation
1884
1905
  # and returns its body.
1885
1906
  #
1886
- # source://net-http//lib/net/http.rb#2318
1907
+ # source://net-http//lib/net/http.rb#2396
1887
1908
  def send_entity(path, data, initheader, dest, type, &block); end
1888
1909
 
1889
- # source://net-http//lib/net/http.rb#2445
1910
+ # source://net-http//lib/net/http.rb#2526
1890
1911
  def sspi_auth(req); end
1891
1912
 
1892
1913
  # @return [Boolean]
1893
1914
  #
1894
- # source://net-http//lib/net/http.rb#2430
1915
+ # source://net-http//lib/net/http.rb#2511
1895
1916
  def sspi_auth?(res); end
1896
1917
 
1897
- # source://net-http//lib/net/http.rb#2329
1918
+ # source://net-http//lib/net/http.rb#2407
1898
1919
  def transport_request(req); end
1899
1920
 
1900
- # source://net-http//lib/net/http.rb#1852
1921
+ # source://net-http//lib/net/http.rb#1925
1901
1922
  def unescape(value); end
1902
1923
 
1903
1924
  class << self
@@ -1907,14 +1928,48 @@ class Net::HTTP < ::Net::Protocol
1907
1928
  # This class is obsolete. You may pass these same parameters directly to
1908
1929
  # \Net::HTTP.new. See Net::HTTP.new for details of the arguments.
1909
1930
  #
1910
- # source://net-http//lib/net/http.rb#1739
1911
- def Proxy(p_addr = T.unsafe(nil), p_port = T.unsafe(nil), p_user = T.unsafe(nil), p_pass = T.unsafe(nil)); end
1931
+ # source://net-http//lib/net/http.rb#1808
1932
+ def Proxy(p_addr = T.unsafe(nil), p_port = T.unsafe(nil), p_user = T.unsafe(nil), p_pass = T.unsafe(nil), p_use_ssl = T.unsafe(nil)); end
1933
+
1934
+ # Allows to set the default configuration that will be used
1935
+ # when creating a new connection.
1936
+ #
1937
+ # Example:
1938
+ #
1939
+ # Net::HTTP.default_configuration = {
1940
+ # read_timeout: 1,
1941
+ # write_timeout: 1
1942
+ # }
1943
+ # http = Net::HTTP.new(hostname)
1944
+ # http.open_timeout # => 60
1945
+ # http.read_timeout # => 1
1946
+ # http.write_timeout # => 1
1947
+ #
1948
+ # source://net-http//lib/net/http.rb#1148
1949
+ def default_configuration; end
1950
+
1951
+ # Allows to set the default configuration that will be used
1952
+ # when creating a new connection.
1953
+ #
1954
+ # Example:
1955
+ #
1956
+ # Net::HTTP.default_configuration = {
1957
+ # read_timeout: 1,
1958
+ # write_timeout: 1
1959
+ # }
1960
+ # http = Net::HTTP.new(hostname)
1961
+ # http.open_timeout # => 60
1962
+ # http.read_timeout # => 1
1963
+ # http.write_timeout # => 1
1964
+ #
1965
+ # source://net-http//lib/net/http.rb#1148
1966
+ def default_configuration=(_arg0); end
1912
1967
 
1913
1968
  # Returns integer +80+, the default port to use for \HTTP requests:
1914
1969
  #
1915
1970
  # Net::HTTP.default_port # => 80
1916
1971
  #
1917
- # source://net-http//lib/net/http.rb#900
1972
+ # source://net-http//lib/net/http.rb#941
1918
1973
  def default_port; end
1919
1974
 
1920
1975
  # :call-seq:
@@ -1949,7 +2004,7 @@ class Net::HTTP < ::Net::Protocol
1949
2004
  # - Net::HTTP::Get: request class for \HTTP method +GET+.
1950
2005
  # - Net::HTTP#get: convenience method for \HTTP method +GET+.
1951
2006
  #
1952
- # source://net-http//lib/net/http.rb#802
2007
+ # source://net-http//lib/net/http.rb#810
1953
2008
  def get(uri_or_host, path_or_headers = T.unsafe(nil), port = T.unsafe(nil)); end
1954
2009
 
1955
2010
  # :call-seq:
@@ -1959,7 +2014,7 @@ class Net::HTTP < ::Net::Protocol
1959
2014
  # Like Net::HTTP.get, but writes the returned body to $stdout;
1960
2015
  # returns +nil+.
1961
2016
  #
1962
- # source://net-http//lib/net/http.rb#761
2017
+ # source://net-http//lib/net/http.rb#769
1963
2018
  def get_print(uri_or_host, path_or_headers = T.unsafe(nil), port = T.unsafe(nil)); end
1964
2019
 
1965
2020
  # :call-seq:
@@ -1969,35 +2024,35 @@ class Net::HTTP < ::Net::Protocol
1969
2024
  # Like Net::HTTP.get, but returns a Net::HTTPResponse object
1970
2025
  # instead of the body string.
1971
2026
  #
1972
- # source://net-http//lib/net/http.rb#812
2027
+ # source://net-http//lib/net/http.rb#820
1973
2028
  def get_response(uri_or_host, path_or_headers = T.unsafe(nil), port = T.unsafe(nil), &block); end
1974
2029
 
1975
2030
  # Returns integer +80+, the default port to use for \HTTP requests:
1976
2031
  #
1977
2032
  # Net::HTTP.http_default_port # => 80
1978
2033
  #
1979
- # source://net-http//lib/net/http.rb#908
2034
+ # source://net-http//lib/net/http.rb#949
1980
2035
  def http_default_port; end
1981
2036
 
1982
2037
  # Returns integer +443+, the default port to use for HTTPS requests:
1983
2038
  #
1984
2039
  # Net::HTTP.https_default_port # => 443
1985
2040
  #
1986
- # source://net-http//lib/net/http.rb#916
2041
+ # source://net-http//lib/net/http.rb#957
1987
2042
  def https_default_port; end
1988
2043
 
1989
2044
  # Returns +false+; retained for compatibility.
1990
2045
  #
1991
2046
  # @return [Boolean]
1992
2047
  #
1993
- # source://net-http//lib/net/http.rb#746
2048
+ # source://net-http//lib/net/http.rb#754
1994
2049
  def is_version_1_1?; end
1995
2050
 
1996
2051
  # Returns +true+; retained for compatibility.
1997
2052
  #
1998
2053
  # @return [Boolean]
1999
2054
  #
2000
- # source://net-http//lib/net/http.rb#741
2055
+ # source://net-http//lib/net/http.rb#749
2001
2056
  def is_version_1_2?; end
2002
2057
 
2003
2058
  # Returns a new \Net::HTTP object +http+
@@ -2029,8 +2084,8 @@ class Net::HTTP < ::Net::Protocol
2029
2084
  # For proxy-defining arguments +p_addr+ through +p_no_proxy+,
2030
2085
  # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
2031
2086
  #
2032
- # source://net-http//lib/net/http.rb#1065
2033
- def new(address, port = T.unsafe(nil), p_addr = T.unsafe(nil), p_port = T.unsafe(nil), p_user = T.unsafe(nil), p_pass = T.unsafe(nil), p_no_proxy = T.unsafe(nil)); end
2087
+ # source://net-http//lib/net/http.rb#1106
2088
+ def new(address, port = T.unsafe(nil), p_addr = T.unsafe(nil), p_port = T.unsafe(nil), p_user = T.unsafe(nil), p_pass = T.unsafe(nil), p_no_proxy = T.unsafe(nil), p_use_ssl = T.unsafe(nil)); end
2034
2089
 
2035
2090
  # Posts data to a host; returns a Net::HTTPResponse object.
2036
2091
  #
@@ -2058,7 +2113,7 @@ class Net::HTTP < ::Net::Protocol
2058
2113
  # - Net::HTTP::Post: request class for \HTTP method +POST+.
2059
2114
  # - Net::HTTP#post: convenience method for \HTTP method +POST+.
2060
2115
  #
2061
- # source://net-http//lib/net/http.rb#855
2116
+ # source://net-http//lib/net/http.rb#863
2062
2117
  def post(url, data, header = T.unsafe(nil)); end
2063
2118
 
2064
2119
  # Posts data to a host; returns a Net::HTTPResponse object.
@@ -2081,41 +2136,75 @@ class Net::HTTP < ::Net::Protocol
2081
2136
  # "id": 101
2082
2137
  # }
2083
2138
  #
2084
- # source://net-http//lib/net/http.rb#882
2139
+ # source://net-http//lib/net/http.rb#890
2085
2140
  def post_form(url, params); end
2086
2141
 
2087
2142
  # Returns the address of the proxy host, or +nil+ if none;
2088
2143
  # see Net::HTTP@Proxy+Server.
2089
2144
  #
2090
- # source://net-http//lib/net/http.rb#1768
2145
+ # source://net-http//lib/net/http.rb#1838
2091
2146
  def proxy_address; end
2092
2147
 
2093
2148
  # Returns true if self is a class which was created by HTTP::Proxy.
2094
2149
  #
2095
2150
  # @return [Boolean]
2096
2151
  #
2097
- # source://net-http//lib/net/http.rb#1762
2152
+ # source://net-http//lib/net/http.rb#1832
2098
2153
  def proxy_class?; end
2099
2154
 
2100
2155
  # Returns the password for accessing the proxy, or +nil+ if none;
2101
2156
  # see Net::HTTP@Proxy+Server.
2102
2157
  #
2103
- # source://net-http//lib/net/http.rb#1780
2158
+ # source://net-http//lib/net/http.rb#1850
2104
2159
  def proxy_pass; end
2105
2160
 
2106
2161
  # Returns the port number of the proxy host, or +nil+ if none;
2107
2162
  # see Net::HTTP@Proxy+Server.
2108
2163
  #
2109
- # source://net-http//lib/net/http.rb#1772
2164
+ # source://net-http//lib/net/http.rb#1842
2110
2165
  def proxy_port; end
2111
2166
 
2167
+ # Use SSL when talking to the proxy. If Net::HTTP does not use a proxy, nil.
2168
+ #
2169
+ # source://net-http//lib/net/http.rb#1853
2170
+ def proxy_use_ssl; end
2171
+
2112
2172
  # Returns the user name for accessing the proxy, or +nil+ if none;
2113
2173
  # see Net::HTTP@Proxy+Server.
2114
2174
  #
2115
- # source://net-http//lib/net/http.rb#1776
2175
+ # source://net-http//lib/net/http.rb#1846
2116
2176
  def proxy_user; end
2117
2177
 
2118
- # source://net-http//lib/net/http.rb#920
2178
+ # Sends a PUT request to the server; returns a Net::HTTPResponse object.
2179
+ #
2180
+ # Argument +url+ must be a URL;
2181
+ # argument +data+ must be a string:
2182
+ #
2183
+ # _uri = uri.dup
2184
+ # _uri.path = '/posts'
2185
+ # data = '{"title": "foo", "body": "bar", "userId": 1}'
2186
+ # headers = {'content-type': 'application/json'}
2187
+ # res = Net::HTTP.put(_uri, data, headers) # => #<Net::HTTPCreated 201 Created readbody=true>
2188
+ # puts res.body
2189
+ #
2190
+ # Output:
2191
+ #
2192
+ # {
2193
+ # "title": "foo",
2194
+ # "body": "bar",
2195
+ # "userId": 1,
2196
+ # "id": 101
2197
+ # }
2198
+ #
2199
+ # Related:
2200
+ #
2201
+ # - Net::HTTP::Put: request class for \HTTP method +PUT+.
2202
+ # - Net::HTTP#put: convenience method for \HTTP method +PUT+.
2203
+ #
2204
+ # source://net-http//lib/net/http.rb#926
2205
+ def put(url, data, header = T.unsafe(nil)); end
2206
+
2207
+ # source://net-http//lib/net/http.rb#961
2119
2208
  def socket_type; end
2120
2209
 
2121
2210
  # :call-seq:
@@ -2204,26 +2293,26 @@ class Net::HTTP < ::Net::Protocol
2204
2293
  # Note: If +port+ is +nil+ and <tt>opts[:use_ssl]</tt> is a truthy value,
2205
2294
  # the value passed to +new+ is Net::HTTP.https_default_port, not +port+.
2206
2295
  #
2207
- # source://net-http//lib/net/http.rb#1010
2296
+ # source://net-http//lib/net/http.rb#1051
2208
2297
  def start(address, *arg, &block); end
2209
2298
 
2210
2299
  # Returns +false+; retained for compatibility.
2211
2300
  #
2212
2301
  # @return [Boolean]
2213
2302
  #
2214
- # source://net-http//lib/net/http.rb#746
2303
+ # source://net-http//lib/net/http.rb#754
2215
2304
  def version_1_1?; end
2216
2305
 
2217
2306
  # Returns +true+; retained for compatibility.
2218
2307
  #
2219
- # source://net-http//lib/net/http.rb#736
2308
+ # source://net-http//lib/net/http.rb#744
2220
2309
  def version_1_2; end
2221
2310
 
2222
2311
  # Returns +true+; retained for compatibility.
2223
2312
  #
2224
2313
  # @return [Boolean]
2225
2314
  #
2226
- # source://net-http//lib/net/http.rb#741
2315
+ # source://net-http//lib/net/http.rb#749
2227
2316
  def version_1_2?; end
2228
2317
  end
2229
2318
  end
@@ -2242,12 +2331,9 @@ module Net::HTTP::ProxyDelta
2242
2331
  def edit_path(path); end
2243
2332
  end
2244
2333
 
2245
- # source://net-http//lib/net/http/backward.rb#7
2246
- Net::HTTP::ProxyMod = Net::HTTP::ProxyDelta
2247
-
2248
2334
  # :stopdoc:
2249
2335
  #
2250
- # source://net-http//lib/net/http.rb#725
2336
+ # source://net-http//lib/net/http.rb#733
2251
2337
  Net::HTTP::VERSION = T.let(T.unsafe(nil), String)
2252
2338
 
2253
2339
  # Response class for <tt>Already Reported (WebDAV)</tt> responses (status code 208).
@@ -2274,8 +2360,10 @@ Net::HTTPAlreadyReported::HAS_BODY = T.let(T.unsafe(nil), TrueClass)
2274
2360
  # source://net-http//lib/net/http/responses.rb#67
2275
2361
  Net::HTTPClientError::EXCEPTION_TYPE = Net::HTTPClientException
2276
2362
 
2277
- # source://net-http//lib/net/http/backward.rb#23
2278
- Net::HTTPClientErrorCode = Net::HTTPClientError
2363
+ # source://net-http//lib/net/http/exceptions.rb#23
2364
+ class Net::HTTPClientException < ::Net::ProtoServerError
2365
+ include ::Net::HTTPExceptions
2366
+ end
2279
2367
 
2280
2368
  # Response class for <tt>Early Hints</tt> responses (status code 103).
2281
2369
  #
@@ -2297,8 +2385,30 @@ class Net::HTTPEarlyHints < ::Net::HTTPInformation; end
2297
2385
  # source://net-http//lib/net/http/responses.rb#148
2298
2386
  Net::HTTPEarlyHints::HAS_BODY = T.let(T.unsafe(nil), FalseClass)
2299
2387
 
2300
- # source://net-http//lib/net/http/backward.rb#24
2301
- Net::HTTPFatalErrorCode = Net::HTTPClientError
2388
+ # source://net-http//lib/net/http/exceptions.rb#15
2389
+ class Net::HTTPError < ::Net::ProtocolError
2390
+ include ::Net::HTTPExceptions
2391
+ end
2392
+
2393
+ # Net::HTTP exception class.
2394
+ # You cannot use Net::HTTPExceptions directly; instead, you must use
2395
+ # its subclasses.
2396
+ #
2397
+ # source://net-http//lib/net/http/exceptions.rb#6
2398
+ module Net::HTTPExceptions
2399
+ # source://net-http//lib/net/http/exceptions.rb#7
2400
+ def initialize(msg, res); end
2401
+
2402
+ # Returns the value of attribute response.
2403
+ #
2404
+ # source://net-http//lib/net/http/exceptions.rb#11
2405
+ def response; end
2406
+ end
2407
+
2408
+ # source://net-http//lib/net/http/exceptions.rb#27
2409
+ class Net::HTTPFatalError < ::Net::ProtoFatalError
2410
+ include ::Net::HTTPExceptions
2411
+ end
2302
2412
 
2303
2413
  # \HTTPGenericRequest is the parent of the Net::HTTPRequest class.
2304
2414
  #
@@ -3406,9 +3516,6 @@ Net::HTTPHeader::MAX_KEY_LENGTH = T.let(T.unsafe(nil), Integer)
3406
3516
  # source://net-http//lib/net/http/responses.rb#23
3407
3517
  Net::HTTPInformation::EXCEPTION_TYPE = Net::HTTPError
3408
3518
 
3409
- # source://net-http//lib/net/http/backward.rb#19
3410
- Net::HTTPInformationCode = Net::HTTPInformation
3411
-
3412
3519
  # Response class for <tt>Loop Detected (WebDAV)</tt> responses (status code 508).
3413
3520
  #
3414
3521
  # The server detected an infinite loop while processing the request.
@@ -3525,17 +3632,95 @@ Net::HTTPRangeNotSatisfiable::HAS_BODY = T.let(T.unsafe(nil), TrueClass)
3525
3632
  # source://net-http//lib/net/http/responses.rb#53
3526
3633
  Net::HTTPRedirection::EXCEPTION_TYPE = Net::HTTPRetriableError
3527
3634
 
3528
- # source://net-http//lib/net/http/backward.rb#21
3529
- Net::HTTPRedirectionCode = Net::HTTPRedirection
3635
+ # This class is the base class for \Net::HTTP request classes.
3636
+ # The class should not be used directly;
3637
+ # instead you should use its subclasses, listed below.
3638
+ #
3639
+ # == Creating a Request
3640
+ #
3641
+ # An request object may be created with either a URI or a string hostname:
3642
+ #
3643
+ # require 'net/http'
3644
+ # uri = URI('https://jsonplaceholder.typicode.com/')
3645
+ # req = Net::HTTP::Get.new(uri) # => #<Net::HTTP::Get GET>
3646
+ # req = Net::HTTP::Get.new(uri.hostname) # => #<Net::HTTP::Get GET>
3647
+ #
3648
+ # And with any of the subclasses:
3649
+ #
3650
+ # req = Net::HTTP::Head.new(uri) # => #<Net::HTTP::Head HEAD>
3651
+ # req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST>
3652
+ # req = Net::HTTP::Put.new(uri) # => #<Net::HTTP::Put PUT>
3653
+ # # ...
3654
+ #
3655
+ # The new instance is suitable for use as the argument to Net::HTTP#request.
3656
+ #
3657
+ # == Request Headers
3658
+ #
3659
+ # A new request object has these header fields by default:
3660
+ #
3661
+ # req.to_hash
3662
+ # # =>
3663
+ # {"accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],
3664
+ # "accept"=>["*/*"],
3665
+ # "user-agent"=>["Ruby"],
3666
+ # "host"=>["jsonplaceholder.typicode.com"]}
3667
+ #
3668
+ # See:
3669
+ #
3670
+ # - {Request header Accept-Encoding}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Accept-Encoding]
3671
+ # and {Compression and Decompression}[rdoc-ref:Net::HTTP@Compression+and+Decompression].
3672
+ # - {Request header Accept}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#accept-request-header].
3673
+ # - {Request header User-Agent}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#user-agent-request-header].
3674
+ # - {Request header Host}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#host-request-header].
3675
+ #
3676
+ # You can add headers or override default headers:
3677
+ #
3678
+ # # res = Net::HTTP::Get.new(uri, {'foo' => '0', 'bar' => '1'})
3679
+ #
3680
+ # This class (and therefore its subclasses) also includes (indirectly)
3681
+ # module Net::HTTPHeader, which gives access to its
3682
+ # {methods for setting headers}[rdoc-ref:Net::HTTPHeader@Setters].
3683
+ #
3684
+ # == Request Subclasses
3685
+ #
3686
+ # Subclasses for HTTP requests:
3687
+ #
3688
+ # - Net::HTTP::Get
3689
+ # - Net::HTTP::Head
3690
+ # - Net::HTTP::Post
3691
+ # - Net::HTTP::Put
3692
+ # - Net::HTTP::Delete
3693
+ # - Net::HTTP::Options
3694
+ # - Net::HTTP::Trace
3695
+ # - Net::HTTP::Patch
3696
+ #
3697
+ # Subclasses for WebDAV requests:
3698
+ #
3699
+ # - Net::HTTP::Propfind
3700
+ # - Net::HTTP::Proppatch
3701
+ # - Net::HTTP::Mkcol
3702
+ # - Net::HTTP::Copy
3703
+ # - Net::HTTP::Move
3704
+ # - Net::HTTP::Lock
3705
+ # - Net::HTTP::Unlock
3706
+ #
3707
+ # source://net-http//lib/net/http/request.rb#75
3708
+ class Net::HTTPRequest < ::Net::HTTPGenericRequest
3709
+ # Creates an HTTP request object for +path+.
3710
+ #
3711
+ # +initheader+ are the default headers to use. Net::HTTP adds
3712
+ # Accept-Encoding to enable compression of the response body unless
3713
+ # Accept-Encoding or Range are supplied in +initheader+.
3714
+ #
3715
+ # @return [HTTPRequest] a new instance of HTTPRequest
3716
+ #
3717
+ # source://net-http//lib/net/http/request.rb#82
3718
+ def initialize(path, initheader = T.unsafe(nil)); end
3719
+ end
3530
3720
 
3531
3721
  # source://net-http//lib/net/http/responses.rb#709
3532
3722
  Net::HTTPRequestURITooLarge = Net::HTTPURITooLong
3533
3723
 
3534
- # Typo since 2001
3535
- #
3536
- # source://net-http//lib/net/http/backward.rb#28
3537
- Net::HTTPResponceReceiver = Net::HTTPResponse
3538
-
3539
3724
  # This class is the base class for \Net::HTTP response classes.
3540
3725
  #
3541
3726
  # == About the Examples
@@ -4004,27 +4189,24 @@ class Net::HTTPResponse::Inflater
4004
4189
  def read_all(dest); end
4005
4190
  end
4006
4191
 
4007
- # source://net-http//lib/net/http/backward.rb#26
4008
- Net::HTTPResponseReceiver = Net::HTTPResponse
4009
-
4010
- # source://net-http//lib/net/http/backward.rb#22
4011
- Net::HTTPRetriableCode = Net::HTTPRedirection
4192
+ # source://net-http//lib/net/http/exceptions.rb#19
4193
+ class Net::HTTPRetriableError < ::Net::ProtoRetriableError
4194
+ include ::Net::HTTPExceptions
4195
+ end
4012
4196
 
4013
4197
  # source://net-http//lib/net/http/responses.rb#81
4014
4198
  Net::HTTPServerError::EXCEPTION_TYPE = Net::HTTPFatalError
4015
4199
 
4016
- # source://net-http//lib/net/http/backward.rb#25
4017
- Net::HTTPServerErrorCode = Net::HTTPServerError
4018
-
4019
- # source://net-http//lib/net/http/backward.rb#17
4200
+ # for backward compatibility until Ruby 3.5
4201
+ # https://bugs.ruby-lang.org/issues/20900
4202
+ # https://github.com/bblimke/webmock/pull/1081
4203
+ #
4204
+ # source://net-http//lib/net/http.rb#2565
4020
4205
  Net::HTTPSession = Net::HTTP
4021
4206
 
4022
4207
  # source://net-http//lib/net/http/responses.rb#38
4023
4208
  Net::HTTPSuccess::EXCEPTION_TYPE = Net::HTTPError
4024
4209
 
4025
- # source://net-http//lib/net/http/backward.rb#20
4026
- Net::HTTPSuccessCode = Net::HTTPSuccess
4027
-
4028
4210
  # Response class for <tt>URI Too Long</tt> responses (status code 414).
4029
4211
  #
4030
4212
  # The URI provided was too long for the server to process.
@@ -4063,6 +4245,3 @@ class Net::HTTPVariantAlsoNegotiates < ::Net::HTTPServerError; end
4063
4245
 
4064
4246
  # source://net-http//lib/net/http/responses.rb#1030
4065
4247
  Net::HTTPVariantAlsoNegotiates::HAS_BODY = T.let(T.unsafe(nil), TrueClass)
4066
-
4067
- # source://net-http//lib/net/http/backward.rb#12
4068
- Net::NetPrivate::HTTPRequest = Net::HTTPRequest