I am using HttpGet to get the contents of some images. It has worked well but now it gives me errors with a new server I am using which returns images on the form of:
https://amx-sfs.qpass.com/d/da/207b3f6f-4fda-4faf-b7ae-a186530e1245
The error is Host name may not be null
I have researched and it seems that the error is common when underscores appear on the URL, however my URL only contains hyphen which i think is accepted by URI. Anyway i also tried using the following to escape the url with no success:
HttpGet mHttpGet = new HttpGet(new URI(null,item.getImageUrl(),null));
What else can be causing the problem and how can i solve it?
Thanks in advance
EDIT
I first tried directly with the Url using
new HttpGet(item.getImageUrl())
Then I also tried with 4 args:
HttpGet mHttpGet = new HttpGet(new URI("https","amx-sfs.qpass.com",item.getImageUrl().substring(25),null));
With the same result, even if I debug the HttpGet Object, and watch the URI object it has, the host property appears ok (amx-sfs.qpass.com) , but I still get the same exception.