Skip to content

Commit

Permalink
send REST as json so RestClient don't confuse array of objects
Browse files Browse the repository at this point in the history
  • Loading branch information
genaromadrid committed Oct 3, 2016
1 parent 5c18350 commit 7e12770
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/coloredcoins/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ def query(method, path, payload = {})
response = RestClient::Request.execute(
method: method,
url: uri,
payload: payload,
ssl_version: 'SSLv23'
payload: payload.to_json,
ssl_version: 'SSLv23',
headers: {
content_type: :json,
accept: :json
}
)
JSON.parse(response, symbolize_names: true)
rescue RestClient::ExceptionWithResponse => e
Expand Down

0 comments on commit 7e12770

Please sign in to comment.