sricNet1.0

HttpResponseHttpClientWebSocket

structHttpResponseextern

varheaders : sric::HashMap$

* request headers

varurl : sric::String

* request URL

varcacheFile : sric::String

* local file path if enable cache

varid : UInt64

* HttpClient id

varstatusCode : Int32

* Http status code: 200

varresult : sric::String

* Response content

structHttpClientextern

varmethod : sric::String

* HTTP request method: GET or POST

varheaders : sric::HashMap$

* request headers

varcontent : sric::String

* POST content

varurl : sric::String

* request URL

varonReceive : fun(res : &sricNet::HttpResponse)

* lambda callback in main thread

varid : UInt64

* user id for this task

varcacheFile : sric::String

* local file path if enable cache

varuseCache : Bool

* enable local file cache

fungetProgress() : Float32

* get download progress * @return 0..1

funsend() : Bool

* send async request

structWebSocketextern

varurl : sric::String

varonReceived : fun(data : raw* const Int8, size : Int32)

varonConnected : fun()

varonDisconnected : fun()

funclose() : Void

funopen(url : raw* const Int8) : Void

funsend(data : raw* const Int8, size : Int32) : Void

funisValid() : Bool