iOS Question Often meet errors using httputils to do http get and post

Discussion in 'iOS Questions' started by xulihang, Feb 9, 2015.

  1. xulihang

    xulihang Active Member Licensed User

    The error message is this: Error: The operation couldn’t be completed. (NSURLErrorDomain error -1001.)

    Get example:

    Code:
    Dim getThread As HttpJob
    getThread.Initialize(
    "getThread",Me)
    getThread.Download(
    "http://bbs.jiangnan.edu.cn/rainstyle/board_json.php?name=ComputerPark&page=1")
    Post example:

    Code:
    Dim param As String
    param=
    "uid="&TextField1.Text&"&psw="&TextField2.Text
    Dim userlogin As HttpJob
    userlogin.Initialize(
    "userlogin",Me)
    userlogin.PostString(
    "http://bbs.jiangnan.edu.cn/rainstyle/apilogin.php",param)
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    It is most probably a network error. You can use a timer to retry the request after a few seconds.
     
  3. xulihang

    xulihang Active Member Licensed User

    Maybe it's the server's problem. I find that if i enter the right username and password, it sucks.
     
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