title: Unable to get response of HTTP call in Postman
body: <p>I am receiving a HTTP call on socket in java. I am sending small data in HTTP from postman and able to receive it in my java application, but the response sent by Java is not received in Postman. </p>
  
  <p>Here is my Java end code:</p>
  
  <pre><code>import java.io.BufferedInputStream;
  import java.io.BufferedOutputStream;
  import java.io.BufferedWriter;
  import java.io.OutputStream;
  import java.io.OutputStreamWriter;
  import java.io.PrintWriter;
  import java.net.InetAddress;
  import java.net.InetSocketAddress;
  import java.net.ServerSocket;
  import java.net.Socket;
  import java.net.URLEncoder;
  import java.net.UnknownHostException;
  
  
  
  
  public class MainClass {
  
      public static void main(String args[]) {
  
          ServerSocket scket;
          Socket clientSocket;
          byte inFromInde[] = new byte[1000];
          int read_size_inde = 0;
  
  
          try{
              scket = new ServerSocket(7502);
              scket.setReuseAddress(true);
              clientSocket = scket.accept();
              System.out.println("Connection accepted");
  
              BufferedInputStream inputFromInde = new BufferedInputStream(clientSocket.getInputStream());
              read_size_inde = inputFromInde.read(inFromInde,0,1000);
              String str = new String(inFromInde);
              System.out.println(str);
              BufferedOutputStream outputToInde = new BufferedOutputStream(clientSocket.getOutputStream());
              OutputStream output = clientSocket.getOutputStream();
  
  
             String response = "HTTP/1.1 200 OK\r\n";
             response = response = "Date: Fri, 04 May 2001 20:08:11 GMT\r\n";
             response = response + "Server: Sanjits Server\r\n";
             response = response + "Connection: close\r\n";
             response = "Hi Hope you are doing good";
             byte[] bytes = response.getBytes();
             output.write(bytes);
             output.flush();
             output.close();
             scket.close();
             clientSocket.close();
  
          }
          catch(Exception e){
  
              System.out.println("Exception is bind Failed");
  
          }
      }
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/lJTO1.png" rel="nofollow noreferrer">Console output in Eclipse</a></p>
  
  <p><a href="https://i.stack.imgur.com/WUZOj.png" rel="nofollow noreferrer">Postman side image</a></p>
  
  <p>How can I get response in Postman.</p>