Can I make my Apache server simply return an HTTP OK when it receives a POST command?

I have an Apache server running on my desktop. If I put

192.168.0.84

into a broswer, it serves what is in index.html in

/var/www/html

When a remote machine sends a POST to /records, I would like this server to send back an HTTP OK to keep the sending machine happy. It doesn’t need to do anything else with it really.

Is this an easy thing to do? Can I just run a wee python script for example to achieve this? If so, how do I make the Apache server do this?

I’m writing some code for an OS on a little ARM device that is successfully sending a POST to my desktop, but the sending thread is hanging as it’s not getting a response from my machine and I just need to avoid this happening. In the field it will be talking to a specialist piece of kit that will process the information it sends.


Source: apache

Leave a Reply