HttpClientHelper 类
程序集: Fantasy.Net.dll
语法
public static class HttpClientHelper
方法
|
编辑本文
查看源代码
CallByGet<T>(string)
用Get方式请求JSON数据,并自动把JSON转换为对象。
声明
public static FTask<T> CallByGet<T>(string url)
参数
返回
类型参数
|
编辑本文
查看源代码
CallByPost<T>(string, HttpContent)
用Post方式请求JSON数据,并自动把JSON转换为对象。
声明
public static FTask<T> CallByPost<T>(string url, HttpContent content)
参数
返回
类型参数
|
编辑本文
查看源代码
CallByPost<T>(string, HttpMethod)
用Post方式请求JSON数据,并自动把JSON转换为对象。
声明
public static FTask<T> CallByPost<T>(string url, HttpMethod method)
参数
返回
类型参数
|
编辑本文
查看源代码
CallNotDeserializeByGet(string)
声明
public static FTask<string> CallNotDeserializeByGet(string url)
参数
返回
异常
|
编辑本文
查看源代码
CallNotDeserializeByPost(string, HttpContent)
声明
public static FTask<string> CallNotDeserializeByPost(string url, HttpContent content)
参数
返回
异常
|
编辑本文
查看源代码
用Post方式请求JSON数据,并自动把JSON转换为对象。
声明
public static FTask<TResponse> Call<TRequest, TResponse>(string url, int id, AuthenticationHeaderValue authentication, string method, params object[] @params) where TRequest : class, IJsonRpcRequest, new()
参数
返回
类型参数