jupyter utf-8

chromesetting
guange 5 years ago
parent 2fb9879955
commit d2008a6607

@ -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 = JSON.parse(params).to_s
req.body = params.to_json
res = https.request(req)
body = res.body
logger.info("--uri_exec: .....res is #{body}")

@ -89,7 +89,7 @@ module JupyterService
raise("获取文件内容失败:#{response.status}")
end
content = response.body
content = response.body.force_encoding('utf-8')
c = GitService.update_file(repo_path: shixun.repo_path,
file_path: "01.ipynb",
@ -117,7 +117,7 @@ module JupyterService
raise("获取文件内容失败:#{response.status}")
end
content = response.body
content = response.body.force_encoding('utf-8')
c = GitService.update_file(repo_path: myshixun.repo_path,
file_path: "01.ipynb",

Loading…
Cancel
Save