HTTP Library

Discussion in 'Questions (Windows Mobile)' started by bish0p, Sep 12, 2008.

  1. bish0p

    bish0p Member Licensed User

    I don't know if I am doing something wrong with the HTTP Library but this code

    Sub Getfound()

    "Cookie",GC_Session_ID&" "&GC_user_id)
       wwwres2.Value = wwwreq2.GetResponse

    regex.New1("Caches Found: [0-9]+")
    Return SubString(match.String,13,StrLength(match.String))
    End Sub
    Works like a charm on the Desktop hangs on the "wwwres2.Value = wwwreq2.GetResponse" on my device

    After I have logged onto the site I ask it to fetch the number of caches I have found. This is done my calling Geocaching - Login with the ASP.NET_SessionID set to the correct Cookie,

    It seems that once I have connected to 2 URLS it the device hangs on the third call to GetResponse. Yes I have the current version of the HTTP Lib.

    Any Ideas.

    Last edited: Sep 12, 2008
  2. Mr_Gee

    Mr_Gee Active Member Licensed User

    Maybe you need to close the webresponse before starting a new one?
    (just thinking out loud here)

    seems to a correct assumption, form the help file :
    Sub GetText (URL)
    Response.Value = Request.GetResponse 'This line calls the server and gets the response.
    string = Response.GetString 'Get the Response string.
    return string
    End Sub
    Last edited: Sep 12, 2008
  3. agraham

    agraham Expert Licensed User

    Well spotted Mr_Gee :sign0188:. From the book "Network Programming for the .NET Framework".
    So even if not the root problem here definitely something that needs doing in any case.
  4. bish0p

    bish0p Member Licensed User

    Yup that did it, I don't know how I missed that ...

  5. Mr_Gee

    Mr_Gee Active Member Licensed User

    thanks for the compliment agraham ;)
  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