分享

Postman发送json格式的post请求

 jackeyqing 2021-03-24

在地址栏里输入请求url:http://127.0.0.1:8081/getmoney

选择“POST”方式,

在“headers”添加key:Content-Type  , value:application/json

点击"body",''raw''并设定为JSON

添加:

{"userid": 1}

点击send发送即可

必须设置Header和将''raw''设定为JSON,否则报下列错误

  1. {
  2. "timestamp": 1543753555357,
  3. "status": 415,
  4. "error": "Unsupported Media Type",
  5. "exception": "org.springframework.web.HttpMediaTypeNotSupportedException",
  6. "message": "Content type 'text/plain;charset=UTF-8' not supported",
  7. "path": "/api/login/account"
  8. }

 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多