![]() |
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. | |
| 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. | |
| 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. | |
| std_httpGetContinueAll (o) | |
| Return if all urls should be processed one by one (1) or not (0). | |
| std_httpGetEnsabled (o) | |
| Return if a request object is enabled (1) or disabled (0) | |
| std_httpGetLastObject () | |
| Return the last request object added. | |
| std_httpGetObjects () | |
| Return all request objects. | |
| std_httpGetPersistent (o) | |
| Return if a request object is persistent (1) or not (0) | |
| std_httpGetRemoveInSuccess (o) | |
| Return if urls should be removed if the process is a success. | |
| std_httpGetSimple (szUrl, cbOk, cbCur, cbError) | |
| GET http asynchronous request. | |
| std_httpGetTest () | |
| Return the current url to test the connection. | |
| std_httpGetTestConection (o) | |
| Return if the connection must be testes before each request or not. | |
| std_httpGetUrl (o) | |
| Return the current url, defined in a request object. | |
| std_httpGetVerb (o) | |
| Return the verb to the given request object. | |
| std_httpnew (szUrl, inet, verb, cbOk, cbCur, cbError, enabled, persistent) | |
| std_httpNew (szUrl) | |
| Create a new persistent request object. | |
| std_httpobjcheck (o) | |
| std_httprun (o) | |
| std_httpRun (o) | |
| Run the process according to the choosen parameters (see others functions in this API) | |
| std_httpSetCallbacks (o, cbOk, cbCur, cbError) | |
| Set the callbacks to a persistent request object. | |
| 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. | |
| std_httpSetEnabled (o, state) | |
| Set if a request object is enabled or disabled. | |
| std_httpSetRemoveInSuccess (o, state) | |
| Set if the urls should be removed in the list if the end of the request is a success. | |
| std_httpSetTest (szUrl) | |
| Set the url to test the connection. | |
| 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. | |
| std_httpSetUrl (o, lUrl) | |
| Set the urls / headers / datas to send. | |
| std_httpSetVerb (o, szVerb) | |
| Set the verb to the all process in this object. | |
| std_httpSupportedVerb () | |
| Return a list of supported request (GET, POST, ...) | |
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 = "PUT" :: nil |
Detailed Description
Scol Standard Library - HTTP client request API.
- Version
- 0.1
- Copyright
- GNU Lesser General Public License 2.0 or later
This API provides some options to write HTTP client request routines for Scol This is older than the Libcurl API ( lib/std/curl.pkg ).
- Remarks
- This API requires the list API ( lib/std/list.pkg ) and the string API ( lib/std/string.pkg )
- This API uses the legacy INET Scol API.
Variable Documentation
| 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
Generated on Sat Jan 31 2015 19:15:42 for Scol standard library package by
1.8.1.2

