FileNotFoundException while getting the InputStream object from HttpURLConnection

前端 未结 7 2149
清酒与你
清酒与你 2020-11-29 02:47

I am trying to send a post request to a url using HttpURLConnection (for using cUrl in java). The content of the request is xml and at the end point, the application proces

7条回答
  •  时光取名叫无心
    2020-11-29 03:04

    Please change

    con = (HttpURLConnection) new URL("http://localhost:8080/myapp/service/generate").openConnection();
    

    To

    con = (HttpURLConnection) new URL("http://YOUR_IP:8080/myapp/service/generate").openConnection();
    

提交回复
热议问题