Android Question HttpUtils2 error message Not Found

Discussion in 'Android Questions' started by davelt99, Jun 15, 2015.

  1. davelt99

    davelt99 Member Licensed User

    Using httpUtils2, I'm attempting to communicate with google maps and also their translation API.

    Posting to google maps with:

    <code>
    sURL=''http://maps.google.com/maps/api/geocode/json?address=" & sAddr & "&sensor=false" Job1.Initialize("Job1",Me)
    Job1.PostString(sURL,"")
    </code>

    works perfectly.

    However when posting to google for a translation:

    <code>
    sURL="http://www.googleapis.com/language/translate/v2?key=" & sMyKey & _
    "&source=es&target=en&q=" & sText
    Job1.Initialize("Job1",Me)
    Job1.PostString(sURL,"")
    </code>

    the Job returns with an error message of "Not Found".

    Both URLs work within a browser, but I can't resolve why one works and the other doesn't.

    Any help would be greatly appreciated.
    Thanks in advance,
     
  2. DonManfred

    DonManfred Expert Licensed User

    have you tried to use DOWNLOAD instead of poststring?
     
    eps and Erel like this.
  3. davelt99

    davelt99 Member Licensed User

    Thanks DonManfred.

    That worked perfectly !!!
     
  4. eps

    eps Well-Known Member Licensed User

    I know this is old, but this change just worked for me - but why??? I've had code which has worked for a LONG time and then suddenly one Poststring request refused to work but another was fine.. I'm suspecting some kind of 'agent' thing - as I couldn't see the same page source information I was interrogating as my Desktop browsers.. Somehow it was being sent to a different page source.
     
  5. eps

    eps Well-Known Member Licensed User

    Actually the above isn't quite true - the feed has changed... curse them! It is 'sort of' switched off sometimes - it responds to Desktop browser requests all the time as I expect but the mobile ones seem to be a bit flakey...

    Very odd!
     
Loading...