utf8编码上传问题

chromesetting
guange 5 years ago
parent 7f6f3e2d1e
commit f34c364762

@ -29,7 +29,7 @@ class GitService
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = root_url.start_with?('https')
req = Net::HTTP::Post.new(uri.path, initheader = {'Content-Type' => 'text/plain;charset=utf-8'})
req.body = params.to_json
req.body = JSON.parse(params)
res = https.request(req)
body = res.body
logger.info("--uri_exec: .....res is #{body}")

Loading…
Cancel
Save