httparty 0.13.7 → 0.24.2

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 (108) hide show
  1. checksums.yaml +5 -5
  2. data/.editorconfig +18 -0
  3. data/.github/dependabot.yml +6 -0
  4. data/.github/workflows/ci.yml +24 -0
  5. data/.gitignore +3 -0
  6. data/.rubocop_todo.yml +1 -1
  7. data/Changelog.md +624 -0
  8. data/Gemfile +11 -3
  9. data/Guardfile +3 -2
  10. data/README.md +18 -17
  11. data/bin/httparty +3 -1
  12. data/docs/README.md +223 -0
  13. data/examples/README.md +35 -12
  14. data/examples/aaws.rb +7 -3
  15. data/examples/body_stream.rb +14 -0
  16. data/examples/crack.rb +1 -1
  17. data/examples/custom_parsers.rb +5 -1
  18. data/examples/delicious.rb +4 -4
  19. data/examples/headers_and_user_agents.rb +7 -3
  20. data/examples/idn.rb +10 -0
  21. data/examples/logging.rb +4 -4
  22. data/examples/microsoft_graph.rb +52 -0
  23. data/examples/multipart.rb +35 -0
  24. data/examples/party_foul_mode.rb +90 -0
  25. data/examples/peer_cert.rb +9 -0
  26. data/examples/stackexchange.rb +1 -1
  27. data/examples/stream_download.rb +26 -0
  28. data/examples/tripit_sign_in.rb +17 -6
  29. data/examples/twitter.rb +2 -2
  30. data/examples/whoismyrep.rb +1 -1
  31. data/httparty.gemspec +9 -5
  32. data/lib/httparty/connection_adapter.rb +71 -24
  33. data/lib/httparty/cookie_hash.rb +10 -8
  34. data/lib/httparty/decompressor.rb +102 -0
  35. data/lib/httparty/exceptions.rb +42 -5
  36. data/lib/httparty/hash_conversions.rb +30 -8
  37. data/lib/httparty/headers_processor.rb +32 -0
  38. data/lib/httparty/logger/apache_formatter.rb +31 -6
  39. data/lib/httparty/logger/curl_formatter.rb +68 -23
  40. data/lib/httparty/logger/logger.rb +5 -1
  41. data/lib/httparty/logger/logstash_formatter.rb +62 -0
  42. data/lib/httparty/module_inheritable_attributes.rb +9 -9
  43. data/lib/httparty/net_digest_auth.rb +23 -21
  44. data/lib/httparty/parser.rb +28 -14
  45. data/lib/httparty/request/body.rb +125 -0
  46. data/lib/httparty/request/multipart_boundary.rb +13 -0
  47. data/lib/httparty/request/streaming_multipart_body.rb +190 -0
  48. data/lib/httparty/request.rb +224 -122
  49. data/lib/httparty/response/headers.rb +23 -19
  50. data/lib/httparty/response.rb +92 -13
  51. data/lib/httparty/response_fragment.rb +21 -0
  52. data/lib/httparty/text_encoder.rb +72 -0
  53. data/lib/httparty/utils.rb +13 -0
  54. data/lib/httparty/version.rb +3 -1
  55. data/lib/httparty.rb +118 -42
  56. data/script/release +4 -4
  57. data/website/css/common.css +1 -1
  58. metadata +50 -112
  59. data/.simplecov +0 -1
  60. data/.travis.yml +0 -7
  61. data/History +0 -390
  62. data/features/basic_authentication.feature +0 -20
  63. data/features/command_line.feature +0 -95
  64. data/features/deals_with_http_error_codes.feature +0 -26
  65. data/features/digest_authentication.feature +0 -30
  66. data/features/handles_compressed_responses.feature +0 -27
  67. data/features/handles_multiple_formats.feature +0 -57
  68. data/features/steps/env.rb +0 -27
  69. data/features/steps/httparty_response_steps.rb +0 -52
  70. data/features/steps/httparty_steps.rb +0 -43
  71. data/features/steps/mongrel_helper.rb +0 -127
  72. data/features/steps/remote_service_steps.rb +0 -90
  73. data/features/supports_read_timeout_option.feature +0 -13
  74. data/features/supports_redirection.feature +0 -22
  75. data/features/supports_timeout_option.feature +0 -13
  76. data/spec/fixtures/delicious.xml +0 -23
  77. data/spec/fixtures/empty.xml +0 -0
  78. data/spec/fixtures/google.html +0 -3
  79. data/spec/fixtures/ssl/generate.sh +0 -29
  80. data/spec/fixtures/ssl/generated/1fe462c2.0 +0 -16
  81. data/spec/fixtures/ssl/generated/bogushost.crt +0 -13
  82. data/spec/fixtures/ssl/generated/ca.crt +0 -16
  83. data/spec/fixtures/ssl/generated/ca.key +0 -15
  84. data/spec/fixtures/ssl/generated/selfsigned.crt +0 -14
  85. data/spec/fixtures/ssl/generated/server.crt +0 -13
  86. data/spec/fixtures/ssl/generated/server.key +0 -15
  87. data/spec/fixtures/ssl/openssl-exts.cnf +0 -9
  88. data/spec/fixtures/twitter.csv +0 -2
  89. data/spec/fixtures/twitter.json +0 -1
  90. data/spec/fixtures/twitter.xml +0 -403
  91. data/spec/fixtures/undefined_method_add_node_for_nil.xml +0 -2
  92. data/spec/httparty/connection_adapter_spec.rb +0 -468
  93. data/spec/httparty/cookie_hash_spec.rb +0 -83
  94. data/spec/httparty/exception_spec.rb +0 -38
  95. data/spec/httparty/hash_conversions_spec.rb +0 -41
  96. data/spec/httparty/logger/apache_formatter_spec.rb +0 -41
  97. data/spec/httparty/logger/curl_formatter_spec.rb +0 -18
  98. data/spec/httparty/logger/logger_spec.rb +0 -38
  99. data/spec/httparty/net_digest_auth_spec.rb +0 -230
  100. data/spec/httparty/parser_spec.rb +0 -173
  101. data/spec/httparty/request_spec.rb +0 -1073
  102. data/spec/httparty/response_spec.rb +0 -241
  103. data/spec/httparty/ssl_spec.rb +0 -74
  104. data/spec/httparty_spec.rb +0 -850
  105. data/spec/spec_helper.rb +0 -59
  106. data/spec/support/ssl_test_helper.rb +0 -47
  107. data/spec/support/ssl_test_server.rb +0 -80
  108. data/spec/support/stub_response.rb +0 -49
metadata CHANGED
@@ -1,30 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httparty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.7
4
+ version: 0.24.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
8
8
  - Sandro Turriate
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-23 00:00:00.000000000 Z
12
+ date: 2026-01-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: json
15
+ name: csv
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '1.8'
20
+ version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '1.8'
27
+ version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: multi_xml
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -39,6 +39,20 @@ dependencies:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: 0.5.2
42
+ - !ruby/object:Gem::Dependency
43
+ name: mini_mime
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 1.0.0
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 1.0.0
42
56
  description: Makes http fun! Also, makes consuming restful web services dead easy.
43
57
  email:
44
58
  - nunemaker@gmail.com
@@ -47,106 +61,78 @@ executables:
47
61
  extensions: []
48
62
  extra_rdoc_files: []
49
63
  files:
64
+ - ".editorconfig"
65
+ - ".github/dependabot.yml"
66
+ - ".github/workflows/ci.yml"
50
67
  - ".gitignore"
51
68
  - ".rubocop.yml"
52
69
  - ".rubocop_todo.yml"
53
- - ".simplecov"
54
- - ".travis.yml"
55
70
  - CONTRIBUTING.md
71
+ - Changelog.md
56
72
  - Gemfile
57
73
  - Guardfile
58
- - History
59
74
  - MIT-LICENSE
60
75
  - README.md
61
76
  - Rakefile
62
77
  - bin/httparty
63
78
  - cucumber.yml
79
+ - docs/README.md
64
80
  - examples/README.md
65
81
  - examples/aaws.rb
66
82
  - examples/basic.rb
83
+ - examples/body_stream.rb
67
84
  - examples/crack.rb
68
85
  - examples/custom_parsers.rb
69
86
  - examples/delicious.rb
70
87
  - examples/google.rb
71
88
  - examples/headers_and_user_agents.rb
89
+ - examples/idn.rb
72
90
  - examples/logging.rb
91
+ - examples/microsoft_graph.rb
92
+ - examples/multipart.rb
73
93
  - examples/nokogiri_html_parser.rb
94
+ - examples/party_foul_mode.rb
95
+ - examples/peer_cert.rb
74
96
  - examples/rescue_json.rb
75
97
  - examples/rubyurl.rb
76
98
  - examples/stackexchange.rb
99
+ - examples/stream_download.rb
77
100
  - examples/tripit_sign_in.rb
78
101
  - examples/twitter.rb
79
102
  - examples/whoismyrep.rb
80
- - features/basic_authentication.feature
81
- - features/command_line.feature
82
- - features/deals_with_http_error_codes.feature
83
- - features/digest_authentication.feature
84
- - features/handles_compressed_responses.feature
85
- - features/handles_multiple_formats.feature
86
- - features/steps/env.rb
87
- - features/steps/httparty_response_steps.rb
88
- - features/steps/httparty_steps.rb
89
- - features/steps/mongrel_helper.rb
90
- - features/steps/remote_service_steps.rb
91
- - features/supports_read_timeout_option.feature
92
- - features/supports_redirection.feature
93
- - features/supports_timeout_option.feature
94
103
  - httparty.gemspec
95
104
  - lib/httparty.rb
96
105
  - lib/httparty/connection_adapter.rb
97
106
  - lib/httparty/cookie_hash.rb
107
+ - lib/httparty/decompressor.rb
98
108
  - lib/httparty/exceptions.rb
99
109
  - lib/httparty/hash_conversions.rb
110
+ - lib/httparty/headers_processor.rb
100
111
  - lib/httparty/logger/apache_formatter.rb
101
112
  - lib/httparty/logger/curl_formatter.rb
102
113
  - lib/httparty/logger/logger.rb
114
+ - lib/httparty/logger/logstash_formatter.rb
103
115
  - lib/httparty/module_inheritable_attributes.rb
104
116
  - lib/httparty/net_digest_auth.rb
105
117
  - lib/httparty/parser.rb
106
118
  - lib/httparty/request.rb
119
+ - lib/httparty/request/body.rb
120
+ - lib/httparty/request/multipart_boundary.rb
121
+ - lib/httparty/request/streaming_multipart_body.rb
107
122
  - lib/httparty/response.rb
108
123
  - lib/httparty/response/headers.rb
124
+ - lib/httparty/response_fragment.rb
125
+ - lib/httparty/text_encoder.rb
126
+ - lib/httparty/utils.rb
109
127
  - lib/httparty/version.rb
110
128
  - script/release
111
- - spec/fixtures/delicious.xml
112
- - spec/fixtures/empty.xml
113
- - spec/fixtures/google.html
114
- - spec/fixtures/ssl/generate.sh
115
- - spec/fixtures/ssl/generated/1fe462c2.0
116
- - spec/fixtures/ssl/generated/bogushost.crt
117
- - spec/fixtures/ssl/generated/ca.crt
118
- - spec/fixtures/ssl/generated/ca.key
119
- - spec/fixtures/ssl/generated/selfsigned.crt
120
- - spec/fixtures/ssl/generated/server.crt
121
- - spec/fixtures/ssl/generated/server.key
122
- - spec/fixtures/ssl/openssl-exts.cnf
123
- - spec/fixtures/twitter.csv
124
- - spec/fixtures/twitter.json
125
- - spec/fixtures/twitter.xml
126
- - spec/fixtures/undefined_method_add_node_for_nil.xml
127
- - spec/httparty/connection_adapter_spec.rb
128
- - spec/httparty/cookie_hash_spec.rb
129
- - spec/httparty/exception_spec.rb
130
- - spec/httparty/hash_conversions_spec.rb
131
- - spec/httparty/logger/apache_formatter_spec.rb
132
- - spec/httparty/logger/curl_formatter_spec.rb
133
- - spec/httparty/logger/logger_spec.rb
134
- - spec/httparty/net_digest_auth_spec.rb
135
- - spec/httparty/parser_spec.rb
136
- - spec/httparty/request_spec.rb
137
- - spec/httparty/response_spec.rb
138
- - spec/httparty/ssl_spec.rb
139
- - spec/httparty_spec.rb
140
- - spec/spec_helper.rb
141
- - spec/support/ssl_test_helper.rb
142
- - spec/support/ssl_test_server.rb
143
- - spec/support/stub_response.rb
144
129
  - website/css/common.css
145
130
  - website/index.html
146
- homepage: http://jnunemaker.github.com/httparty
131
+ homepage: https://github.com/jnunemaker/httparty
147
132
  licenses:
148
133
  - MIT
149
- metadata: {}
134
+ metadata:
135
+ changelog_uri: https://github.com/jnunemaker/httparty/releases
150
136
  post_install_message: When you HTTParty, you must party hard!
151
137
  rdoc_options: []
152
138
  require_paths:
@@ -155,63 +141,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
141
  requirements:
156
142
  - - ">="
157
143
  - !ruby/object:Gem::Version
158
- version: 1.9.3
144
+ version: 2.7.0
159
145
  required_rubygems_version: !ruby/object:Gem::Requirement
160
146
  requirements:
161
147
  - - ">="
162
148
  - !ruby/object:Gem::Version
163
149
  version: '0'
164
150
  requirements: []
165
- rubyforge_project:
166
- rubygems_version: 2.2.3
167
- signing_key:
151
+ rubygems_version: 3.3.7
152
+ signing_key:
168
153
  specification_version: 4
169
154
  summary: Makes http fun! Also, makes consuming restful web services dead easy.
170
- test_files:
171
- - features/basic_authentication.feature
172
- - features/command_line.feature
173
- - features/deals_with_http_error_codes.feature
174
- - features/digest_authentication.feature
175
- - features/handles_compressed_responses.feature
176
- - features/handles_multiple_formats.feature
177
- - features/steps/env.rb
178
- - features/steps/httparty_response_steps.rb
179
- - features/steps/httparty_steps.rb
180
- - features/steps/mongrel_helper.rb
181
- - features/steps/remote_service_steps.rb
182
- - features/supports_read_timeout_option.feature
183
- - features/supports_redirection.feature
184
- - features/supports_timeout_option.feature
185
- - spec/fixtures/delicious.xml
186
- - spec/fixtures/empty.xml
187
- - spec/fixtures/google.html
188
- - spec/fixtures/ssl/generate.sh
189
- - spec/fixtures/ssl/generated/1fe462c2.0
190
- - spec/fixtures/ssl/generated/bogushost.crt
191
- - spec/fixtures/ssl/generated/ca.crt
192
- - spec/fixtures/ssl/generated/ca.key
193
- - spec/fixtures/ssl/generated/selfsigned.crt
194
- - spec/fixtures/ssl/generated/server.crt
195
- - spec/fixtures/ssl/generated/server.key
196
- - spec/fixtures/ssl/openssl-exts.cnf
197
- - spec/fixtures/twitter.csv
198
- - spec/fixtures/twitter.json
199
- - spec/fixtures/twitter.xml
200
- - spec/fixtures/undefined_method_add_node_for_nil.xml
201
- - spec/httparty/connection_adapter_spec.rb
202
- - spec/httparty/cookie_hash_spec.rb
203
- - spec/httparty/exception_spec.rb
204
- - spec/httparty/hash_conversions_spec.rb
205
- - spec/httparty/logger/apache_formatter_spec.rb
206
- - spec/httparty/logger/curl_formatter_spec.rb
207
- - spec/httparty/logger/logger_spec.rb
208
- - spec/httparty/net_digest_auth_spec.rb
209
- - spec/httparty/parser_spec.rb
210
- - spec/httparty/request_spec.rb
211
- - spec/httparty/response_spec.rb
212
- - spec/httparty/ssl_spec.rb
213
- - spec/httparty_spec.rb
214
- - spec/spec_helper.rb
215
- - spec/support/ssl_test_helper.rb
216
- - spec/support/ssl_test_server.rb
217
- - spec/support/stub_response.rb
155
+ test_files: []
data/.simplecov DELETED
@@ -1 +0,0 @@
1
- SimpleCov.start "test_frameworks"
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- notifications:
6
- email: false
7
- bundler_args: --without development
data/History DELETED
@@ -1,390 +0,0 @@
1
- == 0.13.7 aka "party not as hard"
2
- * remove post install emoji as it caused installation issues for some people
3
-
4
- == 0.13.6
5
- * avoid calling String#strip on invalid Strings
6
- * preserve request method on 307 and 308 redirects
7
- * output version with --version for command line bin
8
- * maintain head request method across redirects by default
9
- * add support for RFC2617 MD5-sess algorithm type
10
- * add party popper emoji to post install message
11
-
12
- == 0.13.5
13
- * allow setting a custom URI adapter
14
-
15
- == 0.13.4
16
- * correct redirect url for redirect paths without leading slash
17
- * remove core_extensions.rb as backwards compat for ruby 1.8 not needed
18
- * replace URI.encode with ERB::Util.url_encode
19
- * allow the response to be tapped
20
-
21
- == 0.13.3
22
- * minor improvement
23
- * added option to allow for streaming large files without loading them into memory (672cdae)
24
-
25
- == 0.13.2
26
- * minor improvement
27
- * [Set correct path on redirect to filename](https://github.com/jnunemaker/httparty/pull/337)
28
- * ensure logger works with curl format
29
-
30
- == 0.13.1 2014-04-08
31
- * new
32
- * [Added ability to specify a body_stream in HttpRequest](https://github.com/jnunemaker/httparty/pull/275)
33
- * [Added read_timeout and open_timeout options](https://github.com/jnunemaker/httparty/pull/278)
34
- * change
35
- * [Initialize HTTParty requests with an URI object and a String](https://github.com/jnunemaker/httparty/pull/274)
36
- * minor improvement
37
- * [Add stackexchange API example](https://github.com/jnunemaker/httparty/pull/280)
38
-
39
- == 0.13.0 2014-02-14
40
- * new
41
- * [Add CSV support](https://github.com/jnunemaker/httparty/pull/269)
42
- * [Allows PKCS12 client certificates](https://github.com/jnunemaker/httparty/pull/246)
43
- * bug fix
44
- * [Digest auth no longer fails when multiple headers are sent by the server](https://github.com/jnunemaker/httparty/pull/272)
45
- * [Use 'Basement.copy' when calling 'HTTParty.copy'](https://github.com/jnunemaker/httparty/pull/268)
46
- * [No longer appends ampersand when queries are embedded in paths](https://github.com/jnunemaker/httparty/pull/252)
47
- * change
48
- * [Merge - instead of overwrite - default headers with request provided headers](https://github.com/jnunemaker/httparty/pull/270)
49
- * [Modernize respond_to implementations to support second param](https://github.com/jnunemaker/httparty/pull/264)
50
- * [Sort query parameters by key before processing](https://github.com/jnunemaker/httparty/pull/245)
51
- * minor improvement
52
- * [Add HTTParty::Error base class](https://github.com/jnunemaker/httparty/pull/260)
53
-
54
- == 0.12.0 2013-10-10
55
- * new
56
- * [Added initial logging support](https://github.com/jnunemaker/httparty/pull/243)
57
- * [Add support for local host and port binding](https://github.com/jnunemaker/httparty/pull/238)
58
- * [content_type_charset_support](https://github.com/jnunemaker/httparty/commit/82e351f0904e8ecc856015ff2854698a2ca47fbc)
59
- * bug fix
60
- * [No longer attempt to decompress the body on HEAD requests](https://github.com/jnunemaker/httparty/commit/f2b8cc3d49e0e9363d7054b14f30c340d7b8e7f1)
61
- * [Adding java check in aliasing of multiple choices](https://github.com/jnunemaker/httparty/pull/204/commits)
62
- * change
63
- * [MIME-type files of javascript are returned as a string instead of JSON](https://github.com/jnunemaker/httparty/pull/239)
64
- * [Made SSL connections use the system certificate store by default](https://github.com/jnunemaker/httparty/pull/226)
65
- * [Do not pass proxy options to Net::HTTP connection if not specified](https://github.com/jnunemaker/httparty/pull/222)
66
- * [Replace multi_json with stdlib json](https://github.com/jnunemaker/httparty/pull/214)
67
- * [Require Ruby >= 1.9.3]
68
- * [Response returns array of returned cookie strings](https://github.com/jnunemaker/httparty/pull/218)
69
- * [Allow '=' within value of a cookie]
70
- * minor improvements
71
- * [Improve documentation of ssl_ca_file, ssl_ca_path](https://github.com/jnunemaker/httparty/pull/223)
72
- * [Fix example URLs](https://github.com/jnunemaker/httparty/pull/232)
73
-
74
- == 0.11.0 2013-04-10
75
- * new
76
- * [Add COPY http request handling](https://github.com/jnunemaker/httparty/pull/190)
77
- * [Ruby 2.0 tests](https://github.com/jnunemaker/httparty/pull/194)
78
- * [Ruby >= 2.0.0 support both multiple_choice? and multiple_choices?]
79
- * bug fix
80
- * [Maintain blocks passed to 'perform' in redirects](https://github.com/jnunemaker/httparty/pull/191)
81
- * [Fixed nc value being quoted, this was against spec](https://github.com/jnunemaker/httparty/pull/196)
82
- * [Request#uri no longer duplicates non-relative-path params](https://github.com/jnunemaker/httparty/pull/189)
83
- * change
84
- * [Client-side-only cookie attributes are removed: case-insensitive](https://github.com/jnunemaker/httparty/pull/188)
85
-
86
- == 0.10.2 2013-01-26
87
- * bug fix
88
- * [hash_conversions misnamed variable](https://github.com/jnunemaker/httparty/pull/187)
89
-
90
- == 0.10.1 2013-01-26
91
- * new
92
- * [Added support for MOVE requests](https://github.com/jnunemaker/httparty/pull/183)
93
- * [Bump multi xml version](https://github.com/jnunemaker/httparty/pull/181)
94
-
95
- == 0.10.0 2013-01-10
96
- * changes
97
- * removed yaml support because of security risk (see rails yaml issues)
98
-
99
- == 0.9.0 2012-09-07
100
- * new
101
- * [support for connection adapters](https://github.com/jnunemaker/httparty/pull/157)
102
- * [allow ssl_version on ruby 1.9](https://github.com/jnunemaker/httparty/pull/159)
103
- * bug fixes
104
- * [don't treat port 4430 as ssl](https://github.com/jnunemaker/httparty/commit/a296b1c97f83d7dcc6ef85720a43664c265685ac)
105
- * [deep clone default options](https://github.com/jnunemaker/httparty/commit/f74227d30f9389b4b23a888c9af49fb9b8248e1f)
106
- * a few net digest auth fixes
107
-
108
- == 0.8.3 2012-04-21
109
- * new
110
- * [lazy parsing of responses](https://github.com/jnunemaker/httparty/commit/9fd5259c8dab00e426082b66af44ede2c9068f45)
111
- * [add support for PATCH requests](https://github.com/jnunemaker/httparty/commit/7ab6641e37a9e31517e46f6124f38c615395d38a)
112
- * bug fixes
113
- * [subclasses no longer override superclass options](https://github.com/jnunemaker/httparty/commit/682af8fbf672e7b3009e650da776c85cdfe78d39)
114
-
115
- == 0.8.2 2012-04-12
116
- * new
117
- * add -r to make CLI return failure code if status >= 400
118
- * allow blank username from CLI
119
- * bug fixes
120
- * return nil for null body
121
- * automatically deflate responses with a Content-Encoding: x-gzip header
122
- * Do not HEAD on POST request with digest authentication
123
- * add support for proxy authentication
124
- * fix posting data with CLI
125
- * require rexml/document if xml format from CLI
126
- * support for fragmented responses
127
-
128
- == 0.8.1 2011-10-05
129
- * bug fixes
130
- * content-encoding header should be removed when automatically inflating the body
131
-
132
- == 0.8.0 2011-09-13
133
- * new
134
- * switch to multi json/xml for parsing by default
135
- * bug fixes
136
- * fix redirects to relative uri's
137
-
138
- == 0.7.8 2011-06-06
139
- * bug fix
140
- * Make response honor respond to
141
- * net http timeout can also be a float
142
-
143
- == 0.7.7 2011-04-16
144
- * bug fix
145
- * Fix NoMethodError when using the NON_RAILS_QUERY_STRING_NORMALIZER with a hash whose key is a symbol and value is nil
146
-
147
- == 0.7.5 2011-04-16
148
- * bug fix
149
- * caused issue with latest rubygems
150
-
151
- == 0.7.4 2011-02-13
152
- * bug fixes
153
- * Set VERIFY_NONE when using https. Ruby 1.9.2 no longer sets this for us. gh-67
154
-
155
- == 0.7.3 2011-01-20
156
- * bug fixes
157
- * Fix digest auth for unspecified quality of protection (bjoernalbers, mtrudel, dwo)
158
-
159
- == 0.7.2 2011-01-20
160
- * bug fixes
161
- * Fix gem dependencies
162
-
163
- == 0.7.1 2011-01-19
164
- * bug fixes
165
- * Fix uninitialized constant HTTParty::Response::Net in 1.9.2 (cap10morgan)
166
- * Other fixes for 1.9.2, full suite still fails (cap10morgan)
167
-
168
- == 0.7.0 2011-01-18
169
- * minor enhancements
170
- * Added query methods for HTTP status codes, i.e. response.success?
171
- response.created? (thanks citizenparker)
172
- * Added support for ssl_ca_file and ssl_ca_path (dlitz)
173
- * Allow custom query string normalization. gh-8
174
- * Unlock private keys with password (freerange)
175
- * Added high level request documentation (phildarnowsky)
176
- * Added basic post example (pbuckley)
177
- * Response object has access to its corresponding request object
178
- * Added example of siginin into tripit.com
179
- * Added option to follow redirects (rkj). gh-56
180
- * bug fixes
181
- * Fixed superclass mismatch exception while running tests
182
- (thanks dlitz http://github.com/dlitz/httparty/commit/48224f0615b32133afcff4718ad426df7a4b401b)
183
-
184
- == 0.6.1 2010-07-07
185
- * minor enhancements
186
- * updated to crack 0.1.8
187
- * bug fixes
188
- * subclasses always merge into the parent's default_options and
189
- default_cookies (l4rk).
190
- * subclasses play nicely with grand parents. gh-49
191
-
192
- == 0.6.0 2010-06-13
193
- * major enhancements
194
- * Digest Auth (bartiaco, sbecker, gilles, and aaronrussell)
195
- * Maintain HTTP method across redirects (bartiaco and sbecker)
196
- * HTTParty::Response#response returns the Net::HTTPResponse object
197
- * HTTParty::Response#headers returns a HTTParty::Response::Headers object
198
- which quacks like a Hash + Net::HTTPHeader. The #headers method continues
199
- to be backwards-compatible with the old Hash return value but may become
200
- deprecated in the future.
201
-
202
- * minor enhancements
203
- * Update crack requirement to version 0.1.7
204
- You may still get a warning because Crack's version constant is out of date
205
- * Timeout option can be set for all requests using HTTParty.default_timeout (taazza)
206
- * Closed #38 "headers hash should downcase keys so canonical header name can be used"
207
- * Closed #40 "Gzip response" wherein gziped and deflated responses are
208
- automatically inflated. (carsonmcdonald)
209
-
210
- == 0.5.2 2010-01-31
211
- * minor enhancements
212
- * Update crack requirement to version 0.1.6
213
-
214
- == 0.5.1 2010-01-30
215
- * bug fixes
216
- * Handle 304 response correctly by returning the HTTParty::Response object instead of redirecting (seth and hellvinz)
217
- * Only redirect 300 responses if the header contains a Location
218
- * Don't append empty query strings to the uri. Closes #31
219
- * When no_follow is enabled, only raise the RedirectionTooDeep exception when a response tries redirecting. Closes #28
220
-
221
- * major enhancements
222
- * Removed rubygems dependency. I suggest adding rubygems to RUBYOPT if this causes problems for you.
223
- $ export RUBYOPT='rubygems'
224
- * HTTParty#debug_output prints debugging information for the current request (iwarshak)
225
- * HTTParty#no_follow now available as a class-level option. Sets whether or not to follow redirects.
226
-
227
- * minor enhancements
228
- * HTTParty::VERSION now available
229
- * Update crack requirement to version 0.1.5
230
-
231
- == 0.5.0 2009-12-07
232
- * bug fixes
233
- * inheritable attributes no longer mutable by subclasses (yyyc514)
234
- * namespace BasicObject within HTTParty to avoid class name collisions (eric)
235
-
236
- * major enhancements
237
- * Custom Parsers via class or proc
238
- * Deprecation warning on HTTParty::AllowedFormats
239
- moved to HTTParty::Parser::SupportedFormats
240
-
241
- * minor enhancements
242
- * Curl inspired output when using the binary in verbose mode (alexvollmer)
243
- * raise UnsupportedURIScheme when scheme is not HTTP or HTTPS (djspinmonkey)
244
- * Allow SSL for ports other than 443 when scheme is HTTPS (stefankroes)
245
- * Accept PEM certificates via HTTParty#pem (chrislo)
246
- * Support HEAD and OPTION verbs (grempe)
247
- * Verify SSL certificates when providing a PEM file (collectiveidea/danielmorrison)
248
-
249
- == 0.4.5 2009-09-12
250
- * bug fixes
251
- * Fixed class-level headers overwritten by cookie management code. Closes #19
252
- * Fixed "superclass mismatch for class BlankSlate" error. Closes #20
253
- * Fixed reading files as post data from the command line (vesan)
254
-
255
- * minor enhancements
256
- * Timeout option added; will raise a Timeout::Error after the timeout has elapsed (attack). Closes #17
257
- HTTParty.get "http://github.com", timeout: 1
258
- * Building gem with Jeweler
259
-
260
- == 0.4.4 2009-07-19
261
- * 2 minor update
262
- * :query no longer sets form data. Use body and set content type to application/x-www-form-urlencoded if you need it. :query was wrong for that.
263
- * Fixed a bug in the cookies class method that caused cookies to be forgotten after the first request.
264
- * Also, some general cleanup of tests and such.
265
-
266
- == 0.4.3 2009-04-23
267
- * 1 minor update
268
- * added message to the response object
269
-
270
- == 0.4.2 2009-03-30
271
- * 2 minor changes
272
- * response code now returns an integer instead of a string (jqr)
273
- * rubyforge project setup for crack so i'm now depending on that instead of jnunemaker-crack
274
-
275
- == 0.4.1 2009-03-29
276
- * 1 minor fix
277
- * gem 'jnunemaker-crack' instead of gem 'crack'
278
-
279
- == 0.4.0 2009-03-29
280
- * 1 minor change
281
- * Switched xml and json parsing to crack (same code as before just moved to gem for easier reuse in other projects)
282
-
283
- == 0.3.1 2009-02-10
284
- * 1 minor fix, 1 minor enhancement
285
- * Fixed unescaping umlauts (siebertm)
286
- * Added yaml response parsing (Miha Filej)
287
-
288
- == 0.3.0 2009-01-31
289
- * 1 major enhancement, 1 bug fix
290
- * JSON gem no longer a requirement. It was conflicting with rails json stuff so I just stole ActiveSupport's json decoding and bundled it with HTTParty.
291
- * Fixed bug where query strings were being duplicated on redirects
292
- * Added a bunch of specs and moved some code around.
293
-
294
- == 0.2.10 2009-01-29
295
- * 1 minor enhancement
296
- * Made encoding on query parameters treat everything except URI::PATTERN::UNRESERVED as UNSAFE to force encoding of '+' character (Julian Russell)
297
-
298
- == 0.2.9 2009-01-29
299
- * 3 minor enhancements
300
- * Added a 'headers' accessor to the response with a hash of any HTTP headers. (Don Peterson)
301
- * Add support for a ":cookies" option to be used at the class level, or as an option on any individual call. It should be passed a hash, which will be converted to the proper format and added to the request headers when the call is made. (Don Peterson)
302
- * Refactored several specs and added a full suite of cucumber features (Don Peterson)
303
-
304
- == 0.2.8 2009-01-28
305
- * 1 major fix
306
- * fixed major bug with response where it wouldn't iterate or really work at all with parsed responses
307
-
308
- == 0.2.7 2009-01-28
309
- * 2 minor fixes, 2 minor enhancements, 2 major enhancements
310
- * fixed undefined method add_node for nil class error that occasionally happened (juliocesar)
311
- * Handle nil or unexpected values better when typecasting. (Brian Landau)
312
- * More robust handling of mime types (Alex Vollmer)
313
- * Fixed support for specifying headers and added support for basic auth to CLI. (Alex Vollmer)
314
- * Added first class response object that includes original body and status code (Alex Vollmer)
315
- * Now parsing all response types as some non-200 responses provide important information, this means no more exception raising (Alex Vollmer)
316
-
317
- == 0.2.6 2009-01-05
318
- * 1 minor bug fix
319
- * added explicit require of time as Time#parse failed outside of rails (willcodeforfoo)
320
-
321
- == 0.2.5 2009-01-05
322
- * 1 major enhancement
323
- * Add command line interface to HTTParty (Alex Vollmer)
324
-
325
- == 0.2.4 2008-12-23
326
- * 1 bug fix
327
- * Fixed that mimetype detection was failing if no mimetype was returned from service (skippy)
328
- == 0.2.3 2008-12-23
329
- * 1 bug fix
330
- * Fixed typecasting class variable naming issue
331
-
332
- == 0.2.2 2008-12-08
333
- * 1 bug fix
334
- * Added the missing core extension hash method to_xml_attributes
335
-
336
- == 0.2.1 2008-12-08
337
- * 1 bug fix
338
- * Fixed that HTTParty was borking ActiveSupport and as such Rails (thanks to Rob Sanheim)
339
-
340
- == 0.2.0 2008-12-07
341
- * 1 major enhancement
342
- * Removed ActiveSupport as a dependency. Now requires json gem for json deserialization and uses an included class to do the xml parsing.
343
-
344
- == 0.1.8 2008-11-30
345
- * 3 major enhancements
346
- * Moved base_uri normalization into request class and out of httparty module, fixing
347
- the problem where base_uri was not always being normalized.
348
- * Stupid simple support for HTTParty.get/post/put/delete. (jqr)
349
- * Switched gem management to Echoe from newgem.
350
-
351
- == 0.1.7 2008-11-30
352
- * 1 major enhancement
353
- * fixed multiple class definitions overriding each others options
354
-
355
- == 0.1.6 2008-11-26
356
- * 1 major enhancement
357
- * now passing :query to set_form_data if post request to avoid content length errors
358
-
359
- == 0.1.5 2008-11-14
360
- * 2 major enhancements
361
- * Refactored send request method out into its own object.
362
- * Added :html format if you just want to do that.
363
-
364
- == 0.1.4 2008-11-08
365
- * 3 major enhancements:
366
- * Removed some cruft
367
- * Added ability to follow redirects automatically and turn that off (Alex Vollmer)
368
-
369
- == 0.1.3 2008-08-22
370
-
371
- * 3 major enhancements:
372
- * Added http_proxy key for setting proxy server and port (francxk@gmail.com)
373
- * Now raises exception when http error occurs (francxk@gmail.com)
374
- * Changed auto format detection from file extension to response content type (Jay Pignata)
375
-
376
- == 0.1.2 2008-08-09
377
-
378
- * 1 major enhancement:
379
- * default_params were not being appended to query string if option[:query] was blank
380
-
381
- == 0.1.1 2008-07-30
382
-
383
- * 2 major enhancement:
384
- * Added :basic_auth key for options when making a request
385
- * :query and :body both now work with query string or hash
386
-
387
- == 0.1.0 2008-07-27
388
-
389
- * 1 major enhancement:
390
- * Initial release
@@ -1,20 +0,0 @@
1
- Feature: Basic Authentication
2
-
3
- As a developer
4
- I want to be able to use a service that requires Basic Authentication
5
- Because that is not an uncommon requirement
6
-
7
- Scenario: Passing no credentials to a page requiring Basic Authentication
8
- Given a restricted page at '/basic_auth.html'
9
- When I call HTTParty#get with '/basic_auth.html'
10
- Then it should return a response with a 401 response code
11
-
12
- Scenario: Passing proper credentials to a page requiring Basic Authentication
13
- Given a remote service that returns 'Authenticated Page'
14
- And that service is accessed at the path '/basic_auth.html'
15
- And that service is protected by Basic Authentication
16
- And that service requires the username 'jcash' with the password 'maninblack'
17
- When I call HTTParty#get with '/basic_auth.html' and a basic_auth hash:
18
- | username | password |
19
- | jcash | maninblack |
20
- Then the return value should match 'Authenticated Page'