Project

General

Profile

OpenSpace3D libs
OpenSpace 3D libraries for plugITs and OS3D developer
Loading...
Searching...
No Matches
Network requests and download tools

Functions

 checkInternetConnection (url, cbfun, param)
 Test the Internet connection availability (multiplatform)
 
 clearHttpRequest ()
 Kill all current download requests.
 
 killHttpRequest (req)
 Kill a download request.
 
 clearHttpCookies ()
 Clear all http cookies.
 
 getHttpDomain (url)
 Get the domain of an url.
 
 getHtmlHeader (cont)
 Get Html header from an http response.
 
 getHtmlStatus (header)
 Get Html Status code from header.
 
 downloadFile (file, cbfun)
 Download an url.
 
 downloadFilePost (file, params, headeradd, cbfun)
 Download an url.
 
 downloadFileW (file, wfile, cbfun)
 Download an url in a file.
 
 getUrlContentLenght (file, cbfun)
 Get content size of an url.
 
 getUrlContentDate (file, cbfun)
 Get content date of an url.
 
 getUrlContentInfos (file, cbfun)
 Get content infos of an url.
 
 getUrl (url, params, cbfun)
 Download an url using the GET method.
 
 postUrl (url, params, cbfun)
 Download an url using the POST method.
 
 postUrlMultiPart (url, lparams, cbfun)
 Download an url using the POST method with multipart.
 
 deleteUrl (url, params, cbfun)
 Call the DELETE method on an url.
 

Detailed Description

Network requests and download tools

Function Documentation

◆ checkInternetConnection()

checkInternetConnection ( url  ,
cbfun  ,
param   
)

Test the Internet connection availability (multiplatform)

Prototype: fun [S fun [S u0 I] I u0] I

Returns
0

◆ clearHttpRequest()

clearHttpRequest ( )

Kill all current download requests.

Prototype: fun [] I

Returns
0

◆ killHttpRequest()

killHttpRequest ( req  )

Kill a download request.

Prototype: fun [ObjCURL] I

Parameters
ObjCURL: the request to kill
Returns
0

◆ clearHttpCookies()

clearHttpCookies ( )

Clear all http cookies.

Prototype: fun [] I

Returns
0

◆ getHttpDomain()

getHttpDomain ( url  )

Get the domain of an url.

Prototype: fun [S] S

Parameters
S: the url
Returns
S : the url domain

◆ getHtmlHeader()

getHtmlHeader ( cont  )

Get Html header from an http response.

Prototype: fun [S] S

Parameters
S: the response
Returns
S : the header

◆ getHtmlStatus()

getHtmlStatus ( header  )

Get Html Status code from header.

Prototype: fun [S] I

Parameters
S: the header
Returns
I : the html status code

◆ downloadFile()

downloadFile ( file  ,
cbfun   
)

Download an url.

Prototype: fun [S fun [S S] u0] I

Parameters
S: the url to download
fun[S S] u0 : the callback with url and data
Returns
ObjCURL : the new request

◆ downloadFilePost()

downloadFilePost ( file  ,
params  ,
headeradd  ,
cbfun   
)

Download an url.

Prototype: fun [S fun [S S] u0] I

Parameters
S: the url to download
fun[S S] u0 : the callback with url and data
Returns
ObjCURL : the new request

◆ downloadFileW()

downloadFileW ( file  ,
wfile  ,
cbfun   
)

Download an url in a file.

Prototype: fun [S fun [S S] u0] I

Parameters
S: the url to download
w: the file to write
fun[S W] u0 : the callback with url and data
Returns
ObjCURL : the new request

◆ getUrlContentLenght()

getUrlContentLenght ( file  ,
cbfun   
)

Get content size of an url.

Prototype: fun [S fun [S I] u0] I

Parameters
S: the url to download
fun[S I] u0 : the callback with url and content length
Returns
ObjCURL : the new request

◆ getUrlContentDate()

getUrlContentDate ( file  ,
cbfun   
)

Get content date of an url.

Prototype: fun [S fun [S S] u0] I

Parameters
S: the url to download
fun[S S] u0 : the callback with url and content date or tag
Returns
ObjCURL : the new request

◆ getUrlContentInfos()

getUrlContentInfos ( file  ,
cbfun   
)

Get content infos of an url.

Prototype: fun [S fun [S S I] u0] I

Parameters
S: the url to download
fun[S S I] u0 : the callback with url and content date or tag and length
Returns
ObjCURL : the new request

◆ getUrl()

getUrl ( url  ,
params  ,
cbfun   
)

Download an url using the GET method.

Prototype: fun [S S fun [S S] u0] I

Parameters
S: the url to download
S: the url parameters ("login=toto&pass=tata")
fun[S S] u0 : the callback with url and data
Returns
ObjCURL : the new request

◆ postUrl()

postUrl ( url  ,
params  ,
cbfun   
)

Download an url using the POST method.

Prototype: fun [S S fun [S S] u0] I

Parameters
S: the url to download
S: the url parameters ("login=toto&pass=tata")
fun[S S] u0 : the callback with url and data
Returns
ObjCURL : the new request

◆ postUrlMultiPart()

postUrlMultiPart ( url  ,
lparams  ,
cbfun   
)

Download an url using the POST method with multipart.

Prototype: fun [S [[S S S] r1] fun [S S] u0] I

Parameters
S: the url to download
[[SS S] r1]: list of parameters [name value file]
fun[S S] u0 : the callback with url and data
Returns
ObjCURL : the new request

◆ deleteUrl()

deleteUrl ( url  ,
params  ,
cbfun   
)

Call the DELETE method on an url.

Prototype: fun [S S fun [S S] u0] I

Parameters
S: the url
S: the url parameters ("login=toto&pass=tata")
fun[S S] u0 : the callback with url and data
Returns
ObjCURL : the new request