局域网不可以使用域名

This commit is contained in:
sw 2015-07-16 17:54:42 +08:00
parent 8a9fd7d4c0
commit 421b377785
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ class HomeworkCommonController < ApplicationController
# http.request(req) # http.request(req)
# end # end
uri = URI('http://test.gitlab.trustie.net/api/questions.json') uri = URI('http://192.168.80.21:8080/api/questions.json')
body = question.to_json body = question.to_json
res = Net::HTTP.new(uri.host, uri.port).start do |client| res = Net::HTTP.new(uri.host, uri.port).start do |client|
request = Net::HTTP::Post.new(uri.path) request = Net::HTTP::Post.new(uri.path)

View File

@ -121,7 +121,7 @@ class StudentWorkController < ApplicationController
if stundet_work.save if stundet_work.save
if @homework.homework_type == 2 && @homework.homework_detail_programing #编程作业,学生提交作品后计算系统得分 if @homework.homework_type == 2 && @homework.homework_detail_programing #编程作业,学生提交作品后计算系统得分
url = "http://test.gitlab.trustie.net/api/questions/#{@homework.homework_detail_programing.question_id}/solutions.json" url = "http://192.168.80.21:8080/api/questions/#{@homework.homework_detail_programing.question_id}/solutions.json"
solutions = { solutions = {
stundet_work_id:stundet_work.id, stundet_work_id:stundet_work.id,
src:stundet_work.description, src:stundet_work.description,