-
-
Save humboldt/bec21151cc2a71e00bafce71d46d88d4 to your computer and use it in GitHub Desktop.
RubyでTHETA Sへセッションを貼るだけの例
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'net/http' | |
| HOST = '192.168.1.1' | |
| PORT = 80 | |
| Net::HTTP.start(HOST, PORT) do |http| | |
| req = Net::HTTP::Post.new '/osc/commands/execute' | |
| req.body = <<EOF | |
| { | |
| "name": "camera.startSession", | |
| "parameters": {} | |
| } | |
| EOF | |
| # POSTする | |
| res = http.request req | |
| # 結果を見る | |
| puts res.body | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment