The HTTP response is a message sent by the server back to the client and the have received and interpreted a request message. The "a" of this message consists of the protocol version followed by a numeric status code and its associated textu Al phrase.
An HTTP response is an explanation of the response message sent back to the client after the server receives the request message. The first line of the message includes the protocol version, followed by the numeric status code and its associated text phrase.
HttpResponse response = new Basichttpresponse (httpversion.http_1_1,
httpstatus.sc_ok, "OK");
System.out.println (Response.getprotocolversion ());
System.out.println (Response.getstatusline (). Getstatuscode ());
System.out.println (Response.getstatusline (). Getreasonphrase ());
System.out.println (Response.getstatusline (). toString ());
StdOut >
http/1.1
http/1.1 OK