HttpServer.HandleObjectMethod 方法 (HttpListenerRequest, String, String, Object, Action<HttpListenerRequest, ISessionContext>) |
使用指定的对象来返回网络的API接口,前提是传入的数据为json参数,返回的数据为json数据,详细参照说明
Use the specified object to return the API interface of the network,
provided that the incoming data is json parameters and the returned data is json data,
please refer to the description for details
命名空间:
HslCommunication.Enthernet
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.3.0.0 (12.3.0.0)
语法public static Task<string> HandleObjectMethod(
HttpListenerRequest request,
string deceodeUrl,
string json,
Object obj,
Action<HttpListenerRequest, ISessionContext> action
)
Public Shared Function HandleObjectMethod (
request As HttpListenerRequest,
deceodeUrl As String,
json As String,
obj As Object,
action As Action(Of HttpListenerRequest, ISessionContext)
) As Task(Of String)
public:
static Task<String^>^ HandleObjectMethod(
HttpListenerRequest^ request,
String^ deceodeUrl,
String^ json,
Object^ obj,
Action<HttpListenerRequest^, ISessionContext^>^ action
)
static member HandleObjectMethod :
request : HttpListenerRequest *
deceodeUrl : string *
json : string *
obj : Object *
action : Action<HttpListenerRequest, ISessionContext> -> Task<string>
参数
- request
- 类型:System.Net.HttpListenerRequest
当前的请求信息 - deceodeUrl
- 类型:System.String
已经解码过的Url地址信息 - json
- 类型:System.String
json格式的参数信息 - obj
- 类型:System.Object
等待解析的api解析的对象 - action
- 类型:System.Action<HttpListenerRequest, ISessionContext>
额外的解析Request参数的方法
返回值
类型:
Task<String>等待返回客户的结果
参见