Henry Wong wrote:If you want the https protocol, you should specify it. From your code, I think that you are using the default protocol, which is http.
Henry
Hello Henry,
But that is not the case I guess. I am giving you the proof. Due to some confidential data issue I cannot share the exact endpointUrl but I am giving you a dummy endpointUrl.
I have a endpointUrl
https://abcxyz.com/incident.do?CSV (abcxyz is the only dummy part here), Now this url is returning me the CSV file what I requested by using the below code :
But when I changes the endpointUrl to
https://abcxyz.com/incident.do?CSV&sys_param_query=active=true^sys_updated_onBETWEENjavascript:gs.dateGenerate(%272016-11-20%27,%2700:10:00%27)@javascript:gs.dateGenerate(%272016-11-24%27,%2712:59:59%27) in the same above code, it complains me : java.lang.IllegalArgumentException: Invalid uri . Then I copy pasted this url and noticed that web browser is downloading a CSV for me. So, I googled and came up with solution to encode the url. So my code became :
Now the Invalid uri problem got solved and a new exception came up : java.lang.IllegalArgumentException: host parameter is null, for which again I googled the query and came up with setting up the host configuration :
Again, the problem get resolved and a new problem came up : org.apache.commons.httpclient.URIException: invalid port number
So this was the whole flow of solutions-errors what I faced. But now I am stucked, I have no clue what to do next and my project is on hold due to this. Please help.