Method: Lhj::Command::SyncDingdingUser#save_dept
- Defined in:
- lib/lhj/command/sync_dingding_user.rb
#save_dept(json) ⇒ Object
82 83 84 85 86 87 88 89 |
# File 'lib/lhj/command/sync_dingding_user.rb', line 82 def save_dept(json) url = URI("#{Lhj::IOSRobotConfig.base_url}/dept/create") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Post.new(url) request['Content-Type'] = 'application/json' request.body = json http.request(request) end |