1
0
Fork 0
mirror of https://github.com/rest-client/rest-client.git synced 2022-11-09 13:49:40 -05:00

Add test and history note for ParamsArray payload.

This commit is contained in:
Andy Brody 2017-05-22 01:05:53 -04:00
parent 432b5edbf8
commit 950e25191d
2 changed files with 9 additions and 0 deletions

View file

@ -17,6 +17,10 @@
- The previous fix to avoid having Netrc username/password override an
Authorization header was case-sensitive and incomplete. Fix this by
respecting existing Authorization headers, regardless of letter case. (#550)
- Handle ParamsArray payloads. Previously, rest-client would silently drop a
ParamsArray passed as the payload. Instead, automatically use
Payload::Multipart if the ParamsArray contains a file handle, or use
Payload::UrlEncoded if it doesn't. (#508)
# 2.0.2

View file

@ -265,5 +265,10 @@ Content-Type: text/plain\r
params = RestClient::ParamsArray.new([[:image, f]])
expect(RestClient::Payload.generate(params)).to be_kind_of(RestClient::Payload::Multipart)
end
it "should handle non-multipart payload wrapped in ParamsArray" do
params = RestClient::ParamsArray.new([[:arg, 'value1'], [:arg, 'value2']])
expect(RestClient::Payload.generate(params)).to be_kind_of(RestClient::Payload::UrlEncoded)
end
end
end