Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static Scanner input = new Scanner(new InputStreamReader(socket.getInputStream()));
- private static void getAnswer() throws IOException {
- System.out.println("<server> getting answer");
- while (input.hasNextLine()) {
- String line = input.nextLine();
- System.out.println(line);
- request.add(line);
- if (line == null || line.length() == 0) {
- break;
- }
- }
- System.out.println("exit");
- }
- <server> getting answer
- POST /forms/formPOST.html HTTP/1.1
- Host: localhost
- Connection: keep-alive
- Content-Length: 113
- Cache-Control: max-age=0
- Origin: http://localhost
- Upgrade-Insecure-Requests: 1
- Content-Type: application/x-www-form-urlencoded
- User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36
- Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
- Referer: http://localhost/forms/formPOST.html
- Accept-Encoding: gzip, deflate, br
- Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7
Add Comment
Please, Sign In to add comment