In my code I catch IllegalArgumentException (Illegal character in query at index 85) in line where I execute request to server. Work with was build as patter Command, another tasks completes correct but not this:
public CreateCommentTask(String barcodeId, String ball, String comment,
String sign) {
super(getApplicationUrl() + "?command=createComment" + "&barcodeId="
+ barcodeId + "&ball=" + ball + "&text=" + comment
+ "&sessionId=" + sign);
// TODO Auto-generated constructor stub
}
So, I have only adres and some data in string formate. My app crash in this line:
HttpResponse response = client.execute(task.createRequest());
Do you have any ideas?
I expect you need to URL encode the parameters (most probably the
commentvariable).EDIT: you can use java.net.URI to generate the proper query. Try this: