lib/imperituroard/projects/iot/hua_oceanconnect_adapter.rb in imperituroard-1.1.7 vs lib/imperituroard/projects/iot/hua_oceanconnect_adapter.rb in imperituroard-1.1.8
- old
+ new
@@ -308,9 +308,12 @@
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(uri.path)
request.content_type = 'application/json'
request['Authorization'] = 'Bearer ' + token
request['app_key'] = app_id
+ #request['node-id'] = node_id
+ bbb = {"nodeId": node_id, "appId": "Jy5KpoBUOScZEcrO2bRZhzfaIOUa"}.to_json
+ request.body = bbb
res = https.request(request)
p res.body.to_s
p res.code
{:code => res.code, :message => res.message, :body => valid_json?(res.body.to_s)}
end
\ No newline at end of file