点击或拖拽改变大小

NetworkWebApiBase 类

基于webapi的数据访问的基类,提供了基本的http接口的交互功能
A base class for data access based on webapi that provides basic HTTP interface interaction
继承层次
SystemObject
  HslCommunication.Core.NetNetworkWebApiBase
    HslCommunication.Core.NetNetworkWebApiDevice
    HslCommunication.Core.NetNetworkWebApiRobotBase

命名空间:  HslCommunication.Core.Net
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public class NetworkWebApiBase

NetworkWebApiBase 类型公开以下成员。

构造函数
  名称说明
公共方法NetworkWebApiBase(String)
使用指定的ip地址来初始化对象
Initializes the object using the specified IP address
公共方法NetworkWebApiBase(String, Int32)
使用指定的ip地址及端口号来初始化对象
Initializes the object with the specified IP address and port number
公共方法NetworkWebApiBase(String, Int32, String, String)
使用指定的ip地址,端口号,用户名,密码来初始化对象
Initialize the object with the specified IP address, port number, username, and password
Top
属性
  名称说明
公共属性Client
获取当前的HttpClinet的客户端
Get the current HttpClinet client
公共属性DefaultContentType
默认的内容类型,如果为空,则不进行设置操作。例如设置为 "text/plain", "application/json", "text/html" 等等。
The default content type, if it is empty, no setting operation will be performed. For example, set to "text/plain", "application/json", "text/html" and so on.
公共属性IpAddress
获取或设置远程服务器的IP地址
Gets or sets the IP address of the remote server
公共属性代码示例LogNet
组件的日志工具,支持日志记录,只要实例化后,当前网络的基本信息,就以DEBUG等级进行输出
The component's logging tool supports logging. As long as the instantiation of the basic network information, the output will be output at DEBUG
公共属性Password
获取或设置当前的密码
Get or set the current password
公共属性Port
获取或设置远程服务器的端口号信息
Gets or sets the port number information for the remote server
公共属性UseEncodingISO
获取或设置是否使用ISO的编码信息,默认为 False
Get or set whether to use ISO encoding information, the default is False
公共属性UseHttps
是否启用Https的协议访问,对于Https来说,端口号默认为 443
Whether to enable Https protocol access, for Https, the port number defaults to 443
公共属性UserName
获取或设置当前的用户名
Get or set the current username
Top
方法
  名称说明
受保护的方法AddRequestHeaders
针对请求的头信息进行额外的处理
公共方法Equals (继承自 Object。)
受保护的方法Finalize (继承自 Object。)
公共方法Get
使用GET操作从网络中获取到数据信息
公共方法GetAsync
使用GET操作从网络中获取到数据信息
公共方法GetHashCode (继承自 Object。)
公共方法GetType (继承自 Object。)
受保护的方法MemberwiseClone (继承自 Object。)
公共方法Post
使用POST命令去提交数据内容,然后返回相关的数据信息
公共方法PostAsync
使用POST命令去提交数据内容,然后返回相关的数据信息
公共方法ToString (重写 ObjectToString.)
Top
扩展方法
  名称说明
公共扩展器方法ToJsonString
获取当前对象的JSON格式表示的字符串。
Gets the string represented by the JSON format of the current object.
(由 HslExtension 定义。)
Top
备注
当前的基类在.net framework2.0上存在问题,在.net framework4.5及.net standard上运行稳定而且正常
参见