读取某变量的值

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. webstorm打开一个门户工程流程

    1.电脑上安装了nginx   ,进入conf目录下,找到nginx.conf打开 2.将原配置中server部分替换掉 server{ listen       80;     server_nam ...

  2. Python ctypes.windll.user32() Examples

    Example 1 Project: OSPTF   Author: xSploited   File: mouselogger.py View Source Project 7 votes def ...

  3. const修饰符用法

    1. 将一个对象设置为不可修改 const int a = 100; 2. 指向const对象的指针 const int* p = 3;可以通过指针来修改指针所指向的值,但是不能通过指针*p修改对像的 ...

  4. Centos7上安装docker及使用scrapy-splash

    下载docker  https://www.cnblogs.com/yufeng218/p/8370670.html 安装scrapy-splash  https://www.cnblogs.com/ ...

  5. c#特性attribute:(二)

    日志 初始化 特性类里边构造函数里的属性,带参数不带参数的 ******特性是编译时是不加到il 中的,是加到metadata中 ,本身对程序运行没有影响,除非我们主动的读取和使用区供反射可以使用. ...

  6. Rsync同步设置的一例

    以下文档于2014-12-10更新   先在服务端操作 #wget http://pkgs.repoforge.org/rsync/rsync-3.0.9-2.el6.rfx.x86_64.rpm # ...

  7. Tarjan 割点,桥

    /* ggg ggg ggggggg ggggggg ggggggggggggggggggg ggggggggggggggg ggggggggggg ggggggg ggg g */ /* gyt L ...

  8. python console 设立快捷键 学习源码 用到英语

    arbitrary---随意 iterable----迭代 invalid syntax   -----无效的语法 subscriptable   ----可索引访问的

  9. 扩展方法(深入理解c#)

    1. 静态类到扩展方法: 许多方法可能都适合转为扩展方法,只要具有以下特征: 1)你想为一个类型添加一些成员: 2)你不需要为类型的实例添加更多的数据: 3)你不能改变类型本身,因为是别人的代码 2. ...

  10. 2019.01.02 NOIP训练 三七二十一(生成函数)

    传送门 生成函数基础题. 题意简述:求由1,3,5,7,9这5个数字组成的n位数个数,要求其中3和7出现的次数都要是偶数. 考虑对于每个数字构造生成函数. 对于1,5,9:∑nxnn!=ex\sum_ ...