android - java.lang.IllegalArgumentException: Host name may not be null, while firing a get request -


I would appreciate your help on this, there is a code below which is trying to execute, but this is the exception , I

Please tell me if you have any indication, running on Android 4.4.4

  html gate request = new HttpGet ("https: // S3-eu-west-1.amazonaws.com/developer-application-test/cart/list "); Resp = client.execute (request); 01-22 22: 25: 03.885: W / Systems. Er (1497): java.lang.IllegalArgumentException: The host's name can not be blank 01-22 22: 25: 03.886: W / Systems. Er (14697): .apache.http.HttpHost in organization. & Lt; Init & gt; (HttpHost.java:83) 01-22 22: 25: 03.886: W / Systems. Er (14697): at org.apache.http.impl.client.AbstractHttpClient.determineTarget (Abstrare HTTP Client. JavaAdit 8) 01-22 22: 25: 03.886: W. / System Er (1497): at org.apache.http.impl.client.AbstractHttpClient.execute (Abstrarettttttttttp.jakuq98) 01-22 22: 25: 03.886: W / Systems. ARR (14 9 7): at org.apache.http.impl.client.AbstractHttpClient.execute (Abstrare HTTP Client.JavaQQ76)  

@Tishish is referred to as shampi, it is due to improperly formatted URL. I have typed the following code and debug it on a development phone:

  http client httpclient = new DefaultHttpClient (); URI URL = new URI ("https://s3-euwest1.amazonaws.com/developer-applicationtest/cart/list"); URI URL 1 = New URI ("https://www.google.com/"); HttpGet httpGet = New HTTPAJT (URL); HttpResponse httpResponse = httpClient.execute (httpGet); HttpEntity httpEntity = httpResponse.getEntity ();  

As you can see, I have another URI object which is of https://www.google.com/ When I debug as a comparison, I set the breakpoint on both the URI creating the objects related to the address provided by URI When creating object, the host field is null ...

However, when I do not have an identical URI object for the Google address, host field null , Which means that something in your address is incorrect ...

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -