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:
parent
432b5edbf8
commit
950e25191d
2 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue