post things to mockapi then fetch them

I am trying to implement a feature where I use a POST request to submit data to my mock API, but I’m facing challenges when trying to fetch the data that I posted. My goal is to store the posted data temporarily and then retrieve it using a GET request to simulate a simple backend interaction. However, I’m having issues with:

  1. Data Storage: I need help with correctly storing the data after the POST request is made. I’m using a mock API setup, but I am unsure how to persist this data temporarily so it can be retrieved later.
  2. Fetching Data: I’m having trouble implementing the GET request to fetch the data that was previously posted. I want to ensure that the data is fetched accurately and reflects what was initially posted.
  3. Simulating the API: I want the mock API to behave like a real backend, where data can be posted and then retrieved. I’m not sure if my current setup is correctly simulating this behavior.

I’m looking for examples or guidance on how to properly store the data using POST and then fetch it using GET in a mock API environment.

i want to fetch them in container