有没有办法做的WebClient一个PUT? [英] Is there a way to do a PUT with WebClient?
本文介绍了有没有办法做的WebClient一个PUT?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在.NET 4.0 WebClient类,是有没有办法做一个PUT?
with the WebClient class in .NET 4.0, is there a way to do a PUT?
我知道你可以做DownloadString()和UploadString()一个POST一个GET,但有一个方法或属性,让你做一个PUT?
I know you can do a GET with DownloadString() and a POST with UploadString(), but is there a method or property that lets you do a PUT?
感谢。
推荐答案
有重载 UploadString
让您指定的方法。例如,这个需要一个乌里
,一个字符串
的方法,以及字符串
的数据。
There are overloads for UploadString
that let you specify the method. For example, this one takes a Uri
, a string
for the method, and a string
for the data.
这篇关于有没有办法做的WebClient一个PUT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文