http-post - Thinkster postman 教程帖子请求登录

标签 http-post postman

https://thinkster.io/tutorials/testing-backend-apis-with-postman/customizing-requests-in-postman

我正在实现一个有关 thinkster 的教程,用于学习 postman 。他们有一个测试站点来运行他们的请求,并且有以下 URL 来测试登录功能:

https://conduit.productionready.io/api/users/login

我位于“将您的帐户凭据放入 POST 请求正文中”部分。我已经在测试站点上创建了一个帐户,并且可以从站点本身正确登录。但是当我通过 postman 以原始模式发送具有以下正文的请求时:

{"user":{"email":"<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="63061b020e130f0623050208064d000c0e" rel="noreferrer noopener nofollow">[email protected]</a>", "password":"nopassword"}}

我在漂亮模式下得到以下响应:

{
  "errors": {
    "email or password": [
      "is invalid"
    ]
  }
}

谁能告诉我我做错了什么或者他们是否从这个网站得到了正确的回应?

最佳答案

以防万一其他人需要此问题的解决方案。

In the Body tab of the request editor, select the raw option, and then select JSON in the dropdown that appears to the right of the options.

关于http-post - Thinkster postman 教程帖子请求登录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43704529/

相关文章:

php - Objective-C 发送特殊字符 POST

java - Http Post的响应代码是415。如何使响应代码为200

ios - Cocoa 如何做一个 POST 请求?

c# - MVC 模型绑定(bind) - 在部分编辑期间维护值

Kubernetes pod exec API-需要升级请求

java - response.body().getBasketShopList为空,但Postman中的API JSON不为空

c# - 为什么发送到 POST 的类对象为 NULL?

php - 使用 php CURL 从 http post 获取内容正文

postman - 如何在 postman 中集成 amazon cognito 登录?

node.js - 如何将 postman 中的 include_type_name 设置为 true