带有正文表单数据的邮递员请求到 json [英] Postman request with body Form data to json

查看:17
本文介绍了带有正文表单数据的邮递员请求到 json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

邮递员有问题...

一方面,我可以使用表单数据中的正文提出此请求.

For one side, I can make this request with the body in form data.

但是,当我尝试使用 raw(json) 中的正文发送相同的请求时,我得到了这个:

But, when I try to send the same request with the body in raw(json) I got this:

我正在尝试通过 Angular 5 将数据发送到 Drupal 8 后端.

I am trying to send the data via Angular 5 to a Drupal 8 Backend.

谢谢!

推荐答案

取决于后端是否可以接收 JSON 格式.

It will depend if the backend can receive a JSON format.

就我而言,我正在使用 Drupal 8 Module simple Oauth.并且 OAuth 2.0 Bearer 令牌的格式实际上在单独的规范中进行了描述,RFC 6750.

In my case, I am working with the Drupal 8 Module simple Oauth. and the The format for OAuth 2.0 Bearer tokens is actually described in a separate spec, RFC 6750.

更具体的这里

实体主体遵循应用程序/x-www-form-urlencoded"由 HTML 定义的内容类型4.01 [W3C.REC-html401-19991224].

The entity-body follows the encoding requirements of the "application/x-www-form-urlencoded" content-type as defined by HTML 4.01 [W3C.REC-html401-19991224].

所以,在我的特殊情况下,我会尝试从 angular 发送表单数据.

So, In my particular case, I will try to send a form-data from angular.

谢谢:让·罗斯坦

这篇关于带有正文表单数据的邮递员请求到 json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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