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

查看:47
本文介绍了什么是 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.

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

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