Fantasy
搜索结果

    显示/隐藏目录

    HttpClientHelper 类

    HTTP帮助类

    继承
    object
    HttpClientHelper
    继承成员
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    命名空间: Fantasy.Http
    程序集: Fantasy.Net.dll
    语法
    public static class HttpClientHelper

    方法

    | 编辑本文 查看源代码

    CallByGet<T>(string)

    用Get方式请求JSON数据,并自动把JSON转换为对象。

    声明
    public static FTask<T> CallByGet<T>(string url)
    参数
    类型 名称 描述
    string url
    返回
    类型 描述
    FTask<T>
    类型参数
    名称 描述
    T
    | 编辑本文 查看源代码

    CallByPost<T>(string, HttpContent)

    用Post方式请求JSON数据,并自动把JSON转换为对象。

    声明
    public static FTask<T> CallByPost<T>(string url, HttpContent content)
    参数
    类型 名称 描述
    string url
    HttpContent content
    返回
    类型 描述
    FTask<T>
    类型参数
    名称 描述
    T
    | 编辑本文 查看源代码

    CallByPost<T>(string, HttpMethod)

    用Post方式请求JSON数据,并自动把JSON转换为对象。

    声明
    public static FTask<T> CallByPost<T>(string url, HttpMethod method)
    参数
    类型 名称 描述
    string url
    HttpMethod method
    返回
    类型 描述
    FTask<T>
    类型参数
    名称 描述
    T
    | 编辑本文 查看源代码

    CallNotDeserializeByGet(string)

    用Get方式请求string数据

    声明
    public static FTask<string> CallNotDeserializeByGet(string url)
    参数
    类型 名称 描述
    string url
    返回
    类型 描述
    FTask<string>
    异常
    类型 条件
    Exception
    | 编辑本文 查看源代码

    CallNotDeserializeByPost(string, HttpContent)

    用Post方式请求string数据

    声明
    public static FTask<string> CallNotDeserializeByPost(string url, HttpContent content)
    参数
    类型 名称 描述
    string url
    HttpContent content
    返回
    类型 描述
    FTask<string>
    异常
    类型 条件
    Exception
    | 编辑本文 查看源代码

    Call<TRequest, TResponse>(string, int, AuthenticationHeaderValue, string, params object[])

    用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()
    参数
    类型 名称 描述
    string url
    int id
    AuthenticationHeaderValue authentication
    string method
    object[] params
    返回
    类型 描述
    FTask<TResponse>
    类型参数
    名称 描述
    TRequest
    TResponse
    • 编辑本文
    • 查看源代码
    本文内容
    Back to top Generated by DocFX