public static void main(String[] args) {
		try {
			String url = "192.168.1.103";
			Socket socket = new Socket(url, 8085);
			PrintWriter dos = new PrintWriter(socket.getOutputStream());
			String postData = "imsi=460123&nonce=111111+&deviceid=135&status=1";
			dos.println("POST /syncuser/ HTTP/1.1");
			dos.println("HOST:192.168.1.103");
			dos.println("Content-Type:application/x-www-form-urlencoded");
			dos.println("Content-Length:" + postData.length());
			dos.println("Connection:Close");
			dos.println();
			dos.println(postData);
			dos.flush();
			dos.close();
			// 以上只进行了发送操作
			socket.close();
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

 

相关文章:

  • 2022-12-23
  • 2022-01-02
  • 2022-01-17
  • 2022-12-23
  • 2022-01-23
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-14
  • 2021-06-28
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案