如何提交从C#中的多部分/格式数据HTTP POST请求 [英] How to submit a multipart/form-data HTTP POST request from C#

查看:281
本文介绍了如何提交从C#中的多部分/格式数据HTTP POST请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是提交与C#中的multipart / form-data的内容类型HTTP POST请求的最简单的方法?必须有一个比建设我自己的要求更好的办法。

What is the easiest way to submit an HTTP POST request with a multipart/form-data content type from C#? There has to be a better way than building my own request.

我问的原因是为了使用此API照片上传到Flickr的:

The reason I'm asking is to upload photos to Flickr using this api:

<一个href="http://www.flickr.com/services/api/upload.api.html">http://www.flickr.com/services/api/upload.api.html

推荐答案

首先,没有什么错用纯手工执行使用.NET框架的HTTP命令。请记住,这是一个框架,它应该是pretty的通用。

First of all, there's nothing wrong with pure manual implementation of the HTTP commands using the .Net framework. Do keep in mind that it's a framework, and it is supposed to be pretty generic.

其次,我觉得你可以尝试搜索在.net浏览器中实现。我看到这个,也许它涵盖了问题你问一下。或者你也可以搜索 C#HTTP PUT得到交申请。之一的结果导致的非自由库可能有益的(奇尔卡特 HTTP)

Secondly, I think you can try searching for a browser implementation in .Net. I saw this one, perhaps it covers the issue you asked about. Or you can just search for "C# http put get post request". One of the results leads to a non-free library that may be helpful (Chilkat Http)

如果你碰巧写你自己的HTTP命令的框架上的.Net之上 - 我想我们都可以享受它,如果你分享: - )

If you happen to write your own framework of HTTP commands on top of .Net - I think we can all enjoy it if you share it :-)

这篇关于如何提交从C#中的多部分/格式数据HTTP POST请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆