NetworkWebApiBaseRequestAsync 方法 |
发起一个请求,然后返回结果,支持任意的http方法
Initiate a request and then return the result, supporting any http method
命名空间:
HslCommunication.Core.Net
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.5.3.0 (12.5.3.0)
语法public Task<OperateResult<string>> RequestAsync(
HttpMethod httpMethod,
string rawUrl,
string body,
string contentType = "application/json"
)
Public Function RequestAsync (
httpMethod As HttpMethod,
rawUrl As String,
body As String,
Optional contentType As String = "application/json"
) As Task(Of OperateResult(Of String))
public:
Task<OperateResult<String^>^>^ RequestAsync(
HttpMethod^ httpMethod,
String^ rawUrl,
String^ body,
String^ contentType = L"application/json"
)
member RequestAsync :
httpMethod : HttpMethod *
rawUrl : string *
body : string *
?contentType : string
(* Defaults:
let _contentType = defaultArg contentType "application/json"
*)
-> Task<OperateResult<string>>
参数
- httpMethod
- 类型:System.Net.HttpHttpMethod
请求方法 - rawUrl
- 类型:SystemString
url信息 - body
- 类型:SystemString
body数据 - contentType (Optional)
- 类型:SystemString
内容数据格式
返回值
类型:
TaskOperateResultString返回的结果数据
参见