Scol standard library package
0.3.1
Common and usefull functions for all Scol applications
|
Scol Standard Library - HTTP client request API. More...
Classes | |
struct | STD_HTTP_CLIENT |
Internal structure. You should not call it directly, use API instead ! More... | |
Typedefs | |
typedef struct mkSTD_HTTP_CLIENT | STD_HTTP_CLIENT |
Functions | |
std_httpAddUrl (o, p) | |
Add an url / header / data to send. More... | |
std_httpAddUrlOnly (o, szUrl) | |
Add an url only, without header nor data to send. These two last parameters will be nil, thus, this conivience function should be use to a GET request only. More... | |
std_httpcbinet (inet, o, data, code) | |
std_httpcbisconnected (url, o, res) | |
std_httpconvverb (str) | |
std_httpconvverb2 (n) | |
std_httpdelete (o, err) | |
std_httpGetCallbacks (o) | |
Return the current callbacks, defined in a persistent request object. More... | |
std_httpGetContinueAll (o) | |
Return if all urls should be processed one by one (1) or not (0). More... | |
std_httpGetEnsabled (o) | |
Return if a request object is enabled (1) or disabled (0) More... | |
std_httpGetLastObject () | |
Return the last request object added. More... | |
std_httpGetObjects () | |
Return all request objects. More... | |
std_httpGetPersistent (o) | |
Return if a request object is persistent (1) or not (0) More... | |
std_httpGetRemoveInSuccess (o) | |
Return if urls should be removed if the process is a success. More... | |
std_httpGetSimple (szUrl, cbOk, cbCur, cbError) | |
GET http asynchronous request. More... | |
std_httpGetTest () | |
Return the current url to test the connection. More... | |
std_httpGetTestConection (o) | |
Return if the connection must be testes before each request or not. More... | |
std_httpGetUrl (o) | |
Return the current url, defined in a request object. More... | |
std_httpGetVerb (o) | |
Return the verb to the given request object. More... | |
std_httpnew (szUrl, inet, verb, cbOk, cbCur, cbError, enabled, persistent) | |
std_httpNew (szUrl) | |
Create a new persistent request object. More... | |
std_httpobjcheck (o) | |
std_httprun (o) | |
std_httpRun (o) | |
Run the process according to the choosen parameters (see others functions in this API) More... | |
std_httpSetCallbacks (o, cbOk, cbCur, cbError) | |
Set the callbacks to a persistent request object. More... | |
std_httpSetContinueAll (o, state) | |
Set if the all urls should be processed one by one (1) or not (0). If 0, std_httpRun should be called manually after each previous result. More... | |
std_httpSetEnabled (o, state) | |
Set if a request object is enabled or disabled. More... | |
std_httpSetRemoveInSuccess (o, state) | |
Set if the urls should be removed in the list if the end of the request is a success. More... | |
std_httpSetTest (szUrl) | |
Set the url to test the connection. More... | |
std_httpSetTestConection (o, state) | |
Set if the connection must be testes before each request or not. This is helpful in a local request for example. More... | |
std_httpSetUrl (o, lUrl) | |
Set the urls / headers / datas to send. More... | |
std_httpSetVerb (o, szVerb) | |
Set the verb to the all process in this object. More... | |
std_httpSupportedVerb () | |
Return a list of supported request (GET, POST, ...) More... | |
Variables | |
var | STD_HTTPALLDONE =98 |
var | STD_HTTPALREADYRUNNING =6 |
var | STD_HTTPCANCELLED =4 |
var | STD_HTTPDISABLED =2 |
var | STD_HTTPERRUNKNOWN =-1 |
var | STD_HTTPGET =0 |
var | STD_HTTPNOTCONNECTED =1 |
var | STD_HTTPNOTHING =99 |
var | STD_HTTPNOTPERSISTENT =5 |
var | STD_HTTPPOST =1 |
var | STD_HTTPPUT =2 |
proto | std_httprun =fun [STD_HTTP_CLIENT] STD_HTTP_CLIENT |
var | STD_HTTPSTILLENBLED =3 |
var | STD_HTTPSUCCESS =0 |
var | STD_HTTPVERB =-1 |
typeof | StdHttpClientList =[STD_HTTP_CLIENT r1] |
var | StdHttpClientUrlTest ="http://www.google.com/" |
var | StdHttpSupportedVerb ="GET" :: "POST" :: "PUT" :: nil |
Scol Standard Library - HTTP client request API.
This API provides some options to write HTTP client request routines for Scol This is older than the Libcurl API ( lib/std/curl.pkg ).
var STD_HTTPERRUNKNOWN =-1 |
internal and undefined failure
var STD_HTTPSUCCESS =0 |
success
var STD_HTTPNOTCONNECTED =1 |
client not connected (or connction failure)
var STD_HTTPDISABLED =2 |
object is disabled
var STD_HTTPSTILLENBLED =3 |
a deleting is asked where as object is enabled yet
var STD_HTTPCANCELLED =4 |
request cancelled
var STD_HTTPNOTPERSISTENT =5 |
the current object is not persistent
var STD_HTTPALREADYRUNNING =6 |
an operation is already running
var STD_HTTPALLDONE =98 |
all urls has been processed
var STD_HTTPNOTHING =99 |
request ended