0

I have a server which I want two computers to communicate through - one sends a POST request, the other gets the posted contents, posts a result and the first one gets the posted contents. I know how to make a GET and POST request but how can I wait for a POST request to happen and get the posted contents?

Loading BG
  • 131
  • 2
  • 9
  • what do you mean by the wait for POST request to complete? do you want it to be blocking the GET? otherwise, you can design the GET to throw a 404. – Naman Oct 10 '20 at 14:37
  • Yes, block the GET request until a POST request happens and then get what was posted by the POST request. – Loading BG Oct 10 '20 at 15:11

1 Answers1

0

You'd need to start up a webserver to do so.

A simple way to get started is with something like Spark Framework.

rzwitserloot
  • 85,357
  • 5
  • 51
  • 72