日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

kepware http接口 java语言开发

發布時間:2023/12/13 综合教程 20 生活家
生活随笔 收集整理的這篇文章主要介紹了 kepware http接口 java语言开发 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

讀取某變量的值(OK HTTP

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:39321/iotgateway/read?ids=Channel1.Device1.tag1,Channel1.Device1.tag2")
  .get()
  .addHeader("Connection", "keep-alive")
  .addHeader("Cache-Control", "max-age=0")
  .addHeader("Upgrade-Insecure-Requests", "1")
  .addHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36")
  .addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8")
  .addHeader("Accept-Encoding", "gzip, deflate, br")
  .addHeader("Accept-Language", "zh-CN,zh;q=0.9")
  .addHeader("cache-control", "no-cache")
  .addHeader("Postman-Token", "78b18b05-546a-4eba-aed9-a977e507939d")
  .build();

Response response = client.newCall(request).execute();

讀取某變量的值(UNIREST

HttpResponse<String> response = Unirest.get("http://127.0.0.1:39321/iotgateway/read?ids=Channel1.Device1.tag1,Channel1.Device1.tag2")
  .header("Connection", "keep-alive")
  .header("Cache-Control", "max-age=0")
  .header("Upgrade-Insecure-Requests", "1")
  .header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36")
  .header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8")
  .header("Accept-Encoding", "gzip, deflate, br")
  .header("Accept-Language", "zh-CN,zh;q=0.9")
  .header("cache-control", "no-cache")
  .header("Postman-Token", "35846625-f44e-4723-aadd-ccefac8b4d41")
  .asString();

瀏覽全部變量(OK HTTP

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:39321/iotgateway/browse")
  .get()
  .addHeader("Connection", "keep-alive")
  .addHeader("Cache-Control", "max-age=0")
  .addHeader("Upgrade-Insecure-Requests", "1")
  .addHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36")
  .addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8")
  .addHeader("Accept-Encoding", "gzip, deflate, br")
  .addHeader("Accept-Language", "zh-CN,zh;q=0.9")
  .addHeader("cache-control", "no-cache")
  .addHeader("Postman-Token", "fd5d3981-71c7-4af0-9080-8ab0b1b6a6f4")
  .build();

Response response = client.newCall(request).execute();

瀏覽全部變量(UNIREST

HttpResponse<String> response = Unirest.get("http://127.0.0.1:39321/iotgateway/browse")
  .header("Connection", "keep-alive")
  .header("Cache-Control", "max-age=0")
  .header("Upgrade-Insecure-Requests", "1")
  .header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36")
  .header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8")
  .header("Accept-Encoding", "gzip, deflate, br")
  .header("Accept-Language", "zh-CN,zh;q=0.9")
  .header("cache-control", "no-cache")
  .header("Postman-Token", "ae3420de-9c68-433f-a638-0ac7e6dbd5f2")
  .asString();

總結

以上是生活随笔為你收集整理的kepware http接口 java语言开发的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。