读取某变量的值

require 'uri'
require 'net/http' url = URI("http://127.0.0.1:39321/iotgateway/read?ids=Channel1.Device1.tag1,Channel1.Device1.tag2") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Get.new(url)
request["Connection"] = 'keep-alive'
request["Cache-Control"] = 'max-age=0'
request["Upgrade-Insecure-Requests"] = ''
request["User-Agent"] = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36'
request["Accept"] = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8'
request["Accept-Encoding"] = 'gzip, deflate, br'
request["Accept-Language"] = 'zh-CN,zh;q=0.9'
request["cache-control"] = 'no-cache' response = http.request(request)
puts response.read_body

kepware http接口 c语言 ruby的更多相关文章

  1. kepware http接口 GO语言开发

    读取某变量的值 package main import ( "fmt" "net/http" "io/ioutil" ) func main ...

  2. kepware http接口 c语言 python

    读取某变量的值(http.client import http.client conn = http.client.HTTPConnection("127,0,0,1") head ...

  3. kepware http接口 java语言开发

    读取某变量的值(OK HTTP OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .u ...

  4. kepware http接口 c语言(libcrul)开发

    列出所有变量 CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); ...

  5. AIDL安卓接口定义语言

    Android    Interface Definition  Language简称AIDL翻译为 :安卓       接口      定义        语言 AIDL:进程间通信.Android ...

  6. AIDL —— Android接口定义语言

    AIDL:Android Interface Definition Language,即Android接口定义语言,是Android进程间通信比较常用的一种方式.翻译一下,就是为了让某个Service ...

  7. kepware http接口 swift

    读取某变量的值 import Foundation let headers = [ "Connection": "keep-alive", "Cach ...

  8. kepware http接口 php

    读取某变量的值(HttpRequest <?php $request = new HttpRequest(); $request->setUrl('http://127.0.0.1:393 ...

  9. kepware http接口 OCaml

    读取某变量的值 open Cohttp_lwt_unix open Cohttp open Lwt let uri = Uri.of_string "http://127.0.0.1:393 ...

随机推荐

  1. windbg 边学边记attach 进程和open dump的两个方式查看线程的占用cpu资源

    首先我是attach到进程的方式,附加到进程把. vs里边有个远程调试就是通过连接到远程机附加到进程操作的.在 有公网IP情况下挺好用,但涉及到nat穿越之类的,因为用户的不方便设置,这种调试方式也有 ...

  2. 在浏览器中运行java applet

    最近在看java applet,在eclipse中可以正常运行,于是想试试在浏览器中运行.但途中遇到很多问题,网上很多解答也不全面,于是想把自己的解决过程记录下来. [1]首先,编写的applet程序 ...

  3. C# json解析字符串总是多出双引号

    json好久没用了,今天在用到json的时候,发现对字符串做解析的时候总是多出双引号. 代码如下: string jsonText = "{'name':'test','phone':'18 ...

  4. Android.FamousBlogs

    1. cyrilmottier http://cyrilmottier.com/ http://cyrilmottier.com/about/ 2. greenrobot http://greenro ...

  5. 简单理解RNA-seq

    简单理解RNA-seq 刘小泽 已关注 2018.10.17 23:51* 字数 1518 阅读 46评论 0喜欢 3 今天就当一个小故事看吧,看了statQuest,感觉讲的很棒,于是分享给大家原版 ...

  6. BZOJ1001或洛谷4001 [BJOI2006]狼抓兔子

    BZOJ原题链接 洛谷原题链接 显然就是求最小割. 而对于一个平面图有结论,最大流=最小割=对偶图最短路. 所以这题可用最大流或是转换为对偶图求最短路,这里我是用的对偶图. 虽然理论上按上界算,这题\ ...

  7. codeforces round#510

    蒟蒻和以前一样还是只能做 $4$ 题, 希望有一天可以 水到 $5$ 题!! 不过也终于上了蓝了...   A. Benches Description 给出$N$个座位, 每个座位上初始有$a_i$ ...

  8. Codeforces 767B. The Queue 模拟题

    B. The Queue time limit per test:1 second memory limit per test:256 megabytes input:standard input o ...

  9. lazarus,synedit输入小键盘特殊符号的补丁

    unit synedittextdoublewidthchars2; // fix up chinese symbel width //by steven {$mode objfpc}{$H+} in ...

  10. linux(centOS7,mini),python环境的搭建

    今天想试一试python在linux下的工作,在vmware中安装了centOS7版本的linux,先前装过一个带GUI的,但是感觉在虚拟机理跑的太慢,干脆直接装一个最精简的mini版,试一下ifco ...