You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A first draft of an abstraction for the protocol has been created:
the tabris.HttpRequest object is only used once and recycled after use. The tabris.js code will create a new object for each request. The snippet below reflects the latest comments added below.
We currently do NOT support the upload scenario but sketched the protocol messages for future consistency.
create{type: "tabris.HttpRequest"}call{
method: "send"
property: {
method: string// "GET"
url: string// "url.com/file.txt"
headers: {string,string}
data: string// request body data
timeout: number// connection timeout in ms...}}call{method: "abort"}listen{StateChange: boolean}notify"StateChange"{
state: "uploading"|"uploadend"|"headers"|"loading"|"finished"|"aborted"|"error"|"timeout"
code: number// http status code, send in "headers"
message: string// http status message, send in "headers"
headers: {string,string}// send in "headers"
response: string// send in "finished"}listen{DownloadProgress: boolean}notify"DownloadProgress"{loaded: number,total: number,lengthComputable: boolean}listen{UploadProgress: boolean}notify"UploadProgress"{loaded: number,total: number,lengthComputable: boolean}
The text was updated successfully, but these errors were encountered:
"StateChenge" covers XHR "load", "loadend", "abort", "error", "timeout" and state change 2-4
"Progress" covers "progress". Progress events are fired only while the state is "loading"
"loadstart" and state change 1 (OPENED) can be handled completely in JS (fired after a few pre-checks in the send/open methods, before delegating to the bridge.)
Perhaps "headers" and "loading" can be merged, I'm not sure if there is a state between having the headers but not yet a a single byte of the respose text.
A first draft of an abstraction for the protocol has been created:
the
tabris.HttpRequest
object is only used once and recycled after use. The tabris.js code will create a new object for each request. The snippet below reflects the latest comments added below.We currently do NOT support the upload scenario but sketched the protocol messages for future consistency.
The text was updated successfully, but these errors were encountered: