Skip to content

Commit

Permalink
bugfix resp.message
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioRuiz committed Jan 29, 2019
1 parent 0039712 commit 59a16d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/nice_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1135,11 +1135,11 @@ def manage_response(resp, data)
data.encode!("UTF-8", encoding_response.to_s())
end
if encoding_response != "" and encoding_response.to_s().upcase != "UTF-8"
@response[:message] = resp[:message].to_s().encode("UTF-8", encoding_response.to_s())
@response[:message] = resp.message.to_s().encode("UTF-8", encoding_response.to_s())
#todo: response data in here for example is convert into string, verify if that is correct or needs to maintain the original data type (hash, array...)
resp.each { |key, val| @response[key] = val.to_s().encode("UTF-8", encoding_response.to_s()) }
else
@response[:message] = resp[:message]
@response[:message] = resp.message
resp.each { |key, val| @response[key] = val }
end
if !defined?(Net::HTTP::Post::Multipart) or (defined?(Net::HTTP::Post::Multipart) and !data.kind_of?(Net::HTTP::Post::Multipart))
Expand Down
2 changes: 1 addition & 1 deletion nice_http.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'nice_http'
s.version = '1.3.0'
s.version = '1.3.1'
s.summary = "NiceHttp -- simplest library for accessing and testing HTTP and REST resources."
s.description = "NiceHttp -- simplest library for accessing and testing HTTP and REST resources. Manage different hosts on the fly. Easily get the value you want from the JSON strings. Use hashes on your requests."
s.authors = ["Mario Ruiz"]
Expand Down

0 comments on commit 59a16d4

Please sign in to comment.