post request body will use {ascii_only: false} not 'to_json'

use JSON.generate(opts, :ascii_only => false) instead of 'opts.to_json';
fix logging error when run spec