📌  相关文章
📜  c# HttpResponseMessage postResponse = client.PostAsync - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:09.109000             🧑  作者: Mango

代码示例1
async Task GetResponseString(string text)
{
    var httpClient = new HttpClient();

    var parameters = new Dictionary();
    parameters["text"] = text;

    var response = await httpClient.PostAsync(BaseUri, new FormUrlEncodedContent(parameters));
    var contents = await response.Content.ReadAsStringAsync();

    return contents;
}