Page 1 of 1

1.01 : HTTPRequest() UserData bug

Posted: Mon Apr 13, 2015 10:07 pm
by Comtois
Doc say UserData is an integer, and compiler say UserData should be a string :?

Code: Select all

Procedure HttpGetEvent(Success, Result$, UserData)
    If Success
      ;Debug Result$
      Debug UserData
    Else
      Debug "HTTPRequest(): Error"
    EndIf
  EndProcedure
  
  ; Get the content of this file, and display it in the debug window
  ;
  HTTPRequest(#PB_HTTP_Get, #PB_Compiler_Filename, 123, @HttpGetEvent())

Re: 1.01 : HTTPRequest() UserData bug

Posted: Wed Apr 15, 2015 7:03 am
by Fred
UserData is the last field (optional), so iy should be written like this:

Code: Select all

Procedure HttpGetEvent(Success, Result$, UserData)
    If Success
      ;Debug Result$
      Debug UserData
    Else
      Debug "HTTPRequest(): Error"
    EndIf
  EndProcedure
 
  ; Get the content of this file, and display it in the debug window
  ;
  HTTPRequest(#PB_HTTP_Get, #PB_Compiler_Filename, "", @HttpGetEvent(), 123)

Re: 1.01 : HTTPRequest() UserData bug

Posted: Wed Apr 15, 2015 4:53 pm
by Comtois
Ah yes, i read doc too fast :oops: