Jump to content
Sign in to follow this  

Unable to fetch cursor from dropbox

Recommended Posts

hey I'm currently unable to fetch my cursor from dropbox if anyone can help me that would be awesome. 

Func HttpGet($url, $data)
Local $get = ObjCreate("WinHttp.WinHttpRequest.5.1")
if _FindNetwork() = "xavier" Then   $get.SetProxy(2, "proxy.school:number")
$get.SetTimeouts(30000,60000,30000,400000) ;give 6 minutes for timeout on requests
$get.Open("GET", $url & "?" & $data, False)
If @error Then
   Return SetError(1, 0, $get.ResponseText)


If @error  Then
   Return SetError(2, 0, $get.ResponseText)

If $get.Status <> $HTTP_STATUS_OK Then
   Return SetError(3, 0, $get.ResponseText)

Return SetError(0, 0, $get.ResponseText)

Func HttpGetLongDelta($Cursor)
message("Waiting for change notification")

local $time=currenttime()
local $Random = Random(0,32767,1)
local $url = 'https://api-notify.dropbox.com/1/longpoll_delta'

local $Response  = HttpGet($url,'cursor='&$Cursor) ;wait for 6 minutes
if @error then
    Return SetError(@error, 0, $Response)

message("message: "&$Response)

return SetError(0, 0, $Response)

Edited by Gimerly

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...