0

I'm running a java HTTP server using http core library in apache http components.

I am sending a basic Json key value pair to the server using a POST request.

The handler used is

public void handle(HttpRequest request, HttpResponse response, HttpContext context) 
{
    System.out.println("request received")
}

The request goes through and the handler prints the message. However I have been unable to find anyways to extract the key value pair back from the incoming request.

I also came across How are parameters sent in an HTTP POST request?

however I cannot find any way to access the body of the request

There are plenty tutorials on how to send that key value pair to the server but none about how to retrieve it.

Allahjane
  • 1,732
  • 3
  • 23
  • 35

0 Answers0