什么是http多部分请求? [英] What is http multipart request?

查看:111
本文介绍了什么是http多部分请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写了一段时间的iPhone应用程序,将数据发送到服务器,接收数据(通过HTTP协议),而不用考虑太多。大多数情况下,我理论上熟悉流程,但我不太熟悉的部分是HTTP多部分请求。我知道它的基本结构,但它的核心是我。

I have been writing iPhone applications for some time now, sending data to server, receiving data (via HTTP protocol), without thinking too much about it. Mostly I am theoretically familiar with process, but the part I am not so familiar is HTTP multipart request. I know its basic structure, but the core of it eludes me.

似乎无论何时我发送的东西都不同于纯文本(如照片,音乐),我有使用多部分请求。有人可以简单地向我解释为什么使用它以及它的优点是什么?

It seems that whenever I am sending something different than plain text (like photos, music), I have to use a multipart request. Can someone briefly explain to me why it is used and what are its advantages?

如果我使用它,为什么以这种方式发送照片的方式更好?

If I use it, why is it better way to send photos that way?

推荐答案

HTTP多部分请求是HTTP客户端构造的HTTP请求,用于将文件和数据发送到HTTP服务器。浏览器和HTTP客户端通常使用它将文件上载到服务器。

A HTTP multipart request is a HTTP request that HTTP clients construct to send files and data over to a HTTP Server. It is commonly used by browsers and HTTP clients to upload files to the server.

  • What it looks like
  • See Multipart Content-Type
  • See multipart/form-data

这篇关于什么是http多部分请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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