57 Print(
" !!! OnError() ");
66 Print(
" !!! OnTimeout() ");
proto native RestApi GetRestApi()
proto native void DestroyRestApi()
@ EREST_ERROR_CLIENTERROR
@ EREST_ERROR_SERVERERROR
@ EREST_ERROR_NOTIMPLEMENTED
@ ERESTOPTION_READOPERATION
proto native RestApi CreateRestApi()
proto native void DebugList()
List of all currently active contexes and processed (pending) requests.
proto native RestContext GetRestContext(string serverURL)
Get new or existing context for http comm GetRestContext("www.server915.com/interface/")
proto native void EnableDebug(bool bEnable)
Enable debug output to console (disabled by default)
proto native int GetContextCount()
Get count of registered contexes.
proto native void SetOption(int option, int value)
Set specific option (integer)
void OnFileCreated(string fileName, int dataSize)
Called when data arrived and/ or file created successfully.
void OnError(int errorCode)
Called in case request failed (ERestResultState) - Note! May be called multiple times in case of (Ret...
void OnTimeout()
Called in case request timed out or handled improperly (no error, no success, no data)
void OnSuccess(string data, int dataSize)
Called when data arrived and/ or response processed successfully.
proto native int FILE(RestCallback cb, string request, string filename)
Processes GET request and returns result (ERestResultState) and/ or stores data int specified file (t...
proto native string GET_now(string request)
Processes GET request and returns data immediately (thread blocking operation!)
proto native string POST_now(string request, string data)
Processes POST request and returns data immediately (thread blocking operation!)
proto native int GET(RestCallback cb, string request)
Processes GET request and returns result (ERestResultState) and/ or data (timeout,...
proto native int FILE_now(string request, string filename)
Processes GET request and returns result (ERestResultState) and/ stores data int specified file immed...
proto native void SetHeader(string value)
Set Content-Type header (string)
proto native void reset()
Clear all pending requests and buffers.
proto native int POST(RestCallback cb, string request, string data)
Pushes POST request and returns result (ERestResultState) and/ or data (timeout, error) when finished...
proto void Print(void var)
Prints content of variable to console/log.