Question: How might I implement a local HTTP server using either Java, C#, C or purely Mathematica?

It should be able to respond with Mathematica input to GET and POST requests ideally on W7.

This is related although [doesn't really work.](https://mathematica.stackexchange.com/questions/72551/reading-from-a-socket-stream) If you would like you can read the license [here](https://mathematica.stackexchange.com/questions/27785/implementing-a-100-mathematica-http-server)

Answer: 
The following is a sample implementation of a simple HTTP server in Wolfram Language code only:

<https://github.com/arnoudbuzing/wolfram-server>

You send it a POST request where the body data of the HTTP request contains the Wolfram Language code you wish to evaluate.

The (running) wolframserver.wls script processes the request by evaluating the code string and returning the result as [ExpressionJSON](https://reference.wolfram.com/language/ref/format/ExpressionJSON.html) which should be generic enough to parse and process in most programming languages (including javascript for web browsers).

It's a new and evolving project for me, so please give it a star if this is useful to you because that will tell me how much interest there is in this (and how much time to spend on it for making improvements).
Starting in Mathematica 12, there is a built-in function [`SocketListen`](https://reference.wolfram.com/language/ref/SocketListen.html) that can start a web server and respond to HTTP requests.

`SocketListen` is also available in Mathematica 11.2, but only on an experimental basis.

Further reading: [Network Programming Guide](https://reference.wolfram.com/language/guide/NetworkProgramming.html).