开发者

Java's equivalent of .Net's WebClient

开发者 https://www.devze.com 2023-02-06 20:43 出处:网络
What is the equivalent method or code construction to what WebClient is in .Net? Here is the description of it:

What is the equivalent method or code construction to what WebClient is in .Net? Here is the description of it:

Provides common methods for sending data to and receiving data from a开发者_如何学编程 resource identified by a URI.

Basically I need to know how would I put parameters to the request, just like they do in .Net:

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


This concept is used with REST web services. The resources can be accessed through a URI. Here is a helpful link: Rest web services - GO TO SECTION 5.5(Create a client)

SECTION 5.5

0

精彩评论

暂无评论...
验证码 换一张
取 消