简体   繁体   English

webclient上传文件方法

[英]webclient upload file methods

It seems that webclient supports PUT and POST uploading. 似乎webclient支持PUT和POST上传。 Is there any difference? 有什么区别吗?

Yes, one sends a PUT to the server, one sends a POST . 是的,一个发送一个PUT到服务器,一个发送一个POST In theory, PUT means "enclosed entity [should] be stored under the supplied Request-URI", and POST means "the entity enclosed in the request [i]sa new subordinate of the resource identified by the Request-URI" 从理论上讲,PUT表示“应在提供的Request-URI下存储一个封闭的实体”,而POST则表示“在请求中包含的实体[i]由Request-URI标识的资源的新下属”

But in practice, it's up to the server what to do. 但是实际上,这取决于服务器该做什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM