{"action":"created","issue":{"url":"https://api.github.com/repos/rest-client/rest-client/issues/370","labels_url":"https://api.github.com/repos/rest-client/rest-client/issues/370/labels{/name}","comments_url":"https://api.github.com/repos/rest-client/rest-client/issues/370/comments","events_url":"https://api.github.com/repos/rest-client/rest-client/issues/370/events","html_url":"https://github.com/rest-client/rest-client/issues/370","id":64247243,"number":370,"title":"Reponse string  Marshal.dump error","user":{"login":"Able1991","id":3898046,"avatar_url":"https://avatars.githubusercontent.com/u/3898046?v=3","gravatar_id":"","url":"https://api.github.com/users/Able1991","html_url":"https://github.com/Able1991","followers_url":"https://api.github.com/users/Able1991/followers","following_url":"https://api.github.com/users/Able1991/following{/other_user}","gists_url":"https://api.github.com/users/Able1991/gists{/gist_id}","starred_url":"https://api.github.com/users/Able1991/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Able1991/subscriptions","organizations_url":"https://api.github.com/users/Able1991/orgs","repos_url":"https://api.github.com/users/Able1991/repos","events_url":"https://api.github.com/users/Able1991/events{/privacy}","received_events_url":"https://api.github.com/users/Able1991/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-25T11:28:40Z","updated_at":"2015-03-25T18:42:53Z","closed_at":null,"body":"I have REST service which returns a html [string](https://gist.github.com/Able1991/2318db3f8f44498b45c4), I write this in the rails cache\r\nThis is my code\r\n```ruby\r\n response = RestClient.post DocView + \"files/\" + rguid + '/print', {:format => 'xhtml', :data => source.to_json}\r\n Rails.cache.write(\"#{key}\", response)\r\n```\r\nWhen i use latest version of RestClient(1.8.0) a have an error\r\n```\r\nno _dump_data is defined for class StringIO\r\nactivesupport (3.2.13) lib/active_support/cache.rb:561:in `dump'\r\nactivesupport (3.2.13) lib/active_support/cache.rb:561:in `initialize'\r\nactivesupport (3.2.13) lib/active_support/cache.rb:363:in `new'\r\nactivesupport (3.2.13) lib/active_support/cache.rb:363:in `block in write'\r\nactivesupport (3.2.13) lib/active_support/cache.rb:520:in `instrument'\r\nactivesupport (3.2.13) lib/active_support/cache.rb:362:in `write'\r\napp/controllers/print_controller.rb:546:in `generate_document'\r\nactionpack (3.2.13) lib/action_controller/metal/implicit_render.rb:4:in `send_action'\r\nactionpack (3.2.13) lib/abstract_controller/base.rb:167:in `process_action'\r\n```\r\nIf I change the version of the client on 1.7.3 the error disappears\r\n"},"comment":{"url":"https://api.github.com/repos/rest-client/rest-client/issues/comments/86166475","html_url":"https://github.com/rest-client/rest-client/issues/370#issuecomment-86166475","issue_url":"https://api.github.com/repos/rest-client/rest-client/issues/370","id":86166475,"user":{"login":"ab","id":350770,"avatar_url":"https://avatars.githubusercontent.com/u/350770?v=3","gravatar_id":"","url":"https://api.github.com/users/ab","html_url":"https://github.com/ab","followers_url":"https://api.github.com/users/ab/followers","following_url":"https://api.github.com/users/ab/following{/other_user}","gists_url":"https://api.github.com/users/ab/gists{/gist_id}","starred_url":"https://api.github.com/users/ab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ab/subscriptions","organizations_url":"https://api.github.com/users/ab/orgs","repos_url":"https://api.github.com/users/ab/repos","events_url":"https://api.github.com/users/ab/events{/privacy}","received_events_url":"https://api.github.com/users/ab/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T18:42:53Z","updated_at":"2015-03-25T18:42:53Z","body":"Ugh. This is an unfortunate consequence of AbstractResponse being mixed into the response String object. (It's a terrible design, but one that we're stuck with until a new major release.)\r\n\r\nIf you actually just want the response string (and not headers or other data), you should be able to work around this by saving `String.new(response)` instead."}}