Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Commit

Permalink
moved stringify call to somewhere that won't break the rest client (i…
Browse files Browse the repository at this point in the history
… swear i know what i'm doing.....)
  • Loading branch information
JamesChristie committed Aug 16, 2012
1 parent c924863 commit 198511e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/netsuite-rest-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ def parse_json_result_from_rest(method, params, options={})
:timeout => @timeout }

if options[:payload]
rest_params[:payload] = options[:payload].to_json
rest_params[:payload] = stringify(options[:payload]).to_json
rest_params[:content_type] = :json
rest_params[:accept] = :json
end

reply = nil
retryable(@retry_limit, Exception) do
reply = RestClient::Request.execute(stringify(rest_params)) { |response, request, result, &block|
reply = RestClient::Request.execute(rest_params) { |response, request, result, &block|
case response.code
when 200
response
Expand Down

0 comments on commit 198511e

Please sign in to comment.