I want to send an HTTPRequest to my Web Server. When I use the GET Request, it works. But I want to use a POST Request, so I wrote the following code:
req.setUrl("
http://rv21.software.ee/changecustomer.json")
req.setContentType("application/x-www-form-urlencoded");
req.addArgument("session", session);
req.addArgument("id", CurrentCustomer.ID);
req.addArgument("custname",findTxtName().getText());
req.addArgument("custnummer",findTxtNummer().getText());
req.addArgument("custplz",findTxtPLZ().getText());
req.addArgument("custstadt",findTxtOrt().getText());
req.addArgument("custwebsite",findTxtHomepage().getText());
System.out.println( req.getHttpMethod());
InfiniteProgress prog = new InfiniteProgress();
Dialog dlg = prog.showInifiniteBlocking();
req.setDisposeOnCompletion(dlg);
NetworkManager.getInstance().addToQueueAndWait(req);
The Server gets the POST Request, but not the arguments. Is there something missing in my code?
Please help me.