表单数据,x

编程入门 行业动态 更新时间:2024-10-22 07:25:00
本文介绍了表单数据,x-www-form-urlencoded和Postman Chrome应用程序中的原始数据之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用Postman Chrome扩展来测试网络服务。有三个选项可用于数据输入。我猜原始是发送JSON。另外两种,form-data和x-www-form-urlencoded有什么不同?

I am using the Postman Chrome extension for testing a web service. There are three options available for data input. I guess the raw is for sending JSON. What is the difference between the other two, form-data and x-www-form-urlencoded?

推荐答案

这些是不同的Form W3C定义的内容类型。 如果你想发送简单的文本/ ASCII数据,那么x-www-form-urlencoded将起作用。这是默认设置。

These are different Form content types defined by W3C. If you want to send simple text/ ASCII data, then x-www-form-urlencoded will work. This is the default.

但是,如果您必须发送非ASCII文本或大型二进制数据,则表单数据就是为此而设置的。

But if you have to send non-ASCII text or large binary data, the form-data is for that.

如果您想发送纯文本或JSON或任何其他类型的字符串,则可以使用Raw。就像名字所暗示的那样,邮差发送原始字符串数据的方式没有任何修改。您可以通过使用下拉列表中的内容类型标头来设置您发送的数据类型。

You can use Raw if you want to send plain text or JSON or any other kind of string. Like the name suggests, Postman sends your raw string data as it is without modifications. The type of data that you are sending can be set by using the content-type header from the drop down.

请参阅此链接以获取更多信息: HTML文档中的表单

Refer to this link for further reading: Forms in HTML documents

更多推荐

表单数据,x

本文发布于:2023-10-29 03:53:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1538642.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表单   数据

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!