def rehash_options(opts)

      opts['Accept'] ||= (opts.delete(:accept) || 'application/json')
      opts['Accept'] = 'application/json' if opts['Accept'] == :json

      if ct = opts.delete(:content_type)
        opts['Content-Type'] = ct
      end
      if opts['Content-Type'] == :json
        opts['Content-Type'] = 'application/json'
      end

      if et = opts.delete(:etag)
        opts['If-None-Match'] = et
      end

      opts
    end
def rehash_options(opts)

      opts['Accept'] ||= (opts.delete(:accept) || 'application/json')
      opts['Accept'] = 'application/json' if opts['Accept'] == :json

      if ct = opts.delete(:content_type)
        opts['Content-Type'] = ct
      end
      if opts['Content-Type'] == :json
        opts['Content-Type'] = 'application/json'
      end

      if et = opts.delete(:etag)
        opts['If-None-Match'] = et
      end

      opts
    end
Should work with GET and POST/PUT options