Inserting/Updating pieces and its fields via (apostrophe-headless) REST API

两盒软妹~` 提交于 2021-01-29 08:12:46

问题


Am am currently using Postman to test the api results. I have been following the apostrophe headless docs, since am completely new to this. so what i need is to submit a post request in Postman to add a piece and its fields from REST api. I have got the bearer token and login was success. but when i insert a piece with body as JSON schema. am getting a error message. May be the way am doing is wrong. so can one one help me in Making a post request to add piece and fields through POSTMAN atleast?


回答1:


I did not understand the question quite right. You should add some of your inputs, error message, url, pics and etc. to clarify the problem. However, if you need an example to how to use postman to make a POST request, it's like this:

  1. Select the POST method and insert the API URL (The landing url for POST method not the view and etc.)
  2. Go to headers Tab and add the Authorization token to header
  3. Select the Body tab; Then raw type and finally JSON type. Now insert the Json body and click Send.
  4. You can see the result of webservice call on the top of response window. If it returned 200, everything was OK.


来源:https://stackoverflow.com/questions/64513614/inserting-updating-pieces-and-its-fields-via-apostrophe-headless-rest-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!