gpt4 book ai didi

Java 相当于 .Net 的 WebClient

转载 作者:行者123 更新时间:2023-12-01 05:50:41 25 4
gpt4 key购买 nike

与 .Net 中的 WebClient 等效的方法或代码结构是什么? Here是它的描述:

Provides common methods for sending data to and receiving data from a resource identified by a URI.

基本上我需要知道如何将参数放入请求中,就像它们在 .Net 中所做的那样:

WebClient client = this.WebClient();
client.QueryString.Add("param1", "name");
client.QueryString.Add("param2", "lastname");

最佳答案

此概念与 REST Web 服务一起使用。可以通过 URI 访问资源。这是一个有用的链接: Rest web services - GO TO SECTION 5.5(Create a client)

第 5.5 节

关于Java 相当于 .Net 的 WebClient,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4776991/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com