Connection Error,与“ url”的连接存在网络错误

问题描述 投票:1回答:1

OutPut ImageCONSOLE Output

我试图做一个addAction,该方法在symfony Web应用程序上工作得很好,并且我插入了数据,但是在运行它时我的项目上出现了这个错误。我不知道该怎么办才能识别错误

连接错误,与http://localhost/KiddoEsprit/web/app_dev.php/ajoutermobile/aaaaaaaaaa/bbbbbbbbbb/的连接中存在网络错误

public void ajouterReclamation(Reclamation r){
        ConnectionRequest con = new ConnectionRequest();
        String Url = "http://localhost/KiddoEsprit/web/app_dev.php/ajoutermobile/" +r.getTitre()+ "/" + r.getContenu()  ;
    con.setUrl(Url);

    con.addResponseListener((l) -> {
        String str = new String(con.getResponseData());
        System.out.println(str);

    });
    NetworkManager.getInstance().addToQueueAndWait(con);

    }
java json codenameone
1个回答
0
投票

当我开始在请求中发送对象时,错误已修复

String Url = "http://localhost/KiddoEsprit/web/app_dev.php/ajoutermobile?titre=" + r.getTitre()+ "&contenu=" + r.getContenu()  ;

并在我的symfony应用程序中更改了一些代码行

© www.soinside.com 2019 - 2024. All rights reserved.