开发者

How to POST specific parameters and their value via http protocol in C#?

I am trying to send a set of parameters and their values via http protocol in C#.

A list of parameters(specified by service provider) and their values are:

"name" -- "a name"

"type" -- "a type name"

"file_in" -- "uploaded file"

"a name" and "a type name" are string. As I did research on the Internet, the only example I found is by using addParam like:

request.addParam("name","a name");
request.addParam("type","a type name");

(Is it correct? I开发者_如何学C'm not sure about it...)

But what about "file_in"??? How can I post(upload) a file with specific parameter name "file_in" via http protocol? Could you please give me an example?

Thanks in advance for your answers :D


Check : WebClient.UploadValues Method (Uri, NameValueCollection)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜