Android Question Httpjob Download2

Discussion in 'Android Questions' started by Anser, Mar 17, 2015.

  1. Anser

    Anser Well-Known Member Licensed User

    Hi,

    If I use HttpJob.Download it works fine, but if I use HttpJob.Download2 then I get the following error

    Code:
    Error: java.lang.IllegalStateException: Target host must not be nullor set in parameters. scheme=null, host=nullpath=www.myserver.com/myphp/myscripts.php
    This code words fine.
    Code:
    Dim Login As HttpJob
    Login.Initialize(
    "L",Me)
    Login.Download(
    "http://www.myservername.com/myphp/myscripts.php?action=Login&user_id=myuserid&password=mypassword")
    But the following code fails.
    Code:
    Dim Login As HttpJob
    Login.Initialize(
    "L",Me)
    Login.Download2(
    "www.myservername.com/myphp/myscripts.php"Array As String("action","Login","user_id",cUserName,"password",cPassword ) )
    Any info, why Download2 is throwing such an error ?

    Regards
    Anser
     
  2. Anser

    Anser Well-Known Member Licensed User

    Resolved.

    The problem was the missing http:// in the url
     
    DonManfred likes this.
  3. DonManfred

    DonManfred Expert Licensed User

    It was the information in the error message too.
    Edit: Sorry. my fault.. The error did not tell that the scheme was null; it said the host. But the host is ok in your URL
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice