diff --git a/readme/html/OxDoc.html b/readme/html/OxDoc.html new file mode 100644 index 00000000..90904472 --- /dev/null +++ b/readme/html/OxDoc.html @@ -0,0 +1,92 @@ + +

Ox.doc - A JavaScript Documentation Language

+ +

foo bar

+ +
//@ My.TYPES <number> Request timeout, in seconds
+My.REQUEST_TIMEOUT = 60;
+try it out + +

foo bar

+ +
/*@
+My.getProtocol <function> Returns the protocol part of a URL
+    (url) -> <string> Protocol, like "https", otherwise ""
+    url <string> Just some URL
+@*/
+My.getProtocol = function(url) {
+    var match = url.match(/^(.+):\/\//);
+    return match ? match[1] : '';
+};
+ +

foo bar

+ +
/*@
+My.readURL <f> Reads data from a remote URL
+    (url, callback) -> <o> Request handler
+    (url, options, callback) -> <o> Request handler
+        cancel <f> Function to cancel the request
+    url <s> Remote URL
+    options <o> Optional config object
+        timeout <n|60> Timeout in seconds
+        type <s|'GET'> Request type ('GET', 'POST', 'PUT' or 'DELETE')
+    callback <f> Callback function
+        result <o> Result object
+            status <n> HTTP status code
+            data <s> Data read from URL, or empty string
+@*/
+My.readURL = function(url, options, callback) {
+    if (arguments.length == 2) {
+        callback = options;
+        options = {timeout: 60, type: 'GET'};
+    }
+};
+try it out + + +

foo bar

+ +
/*@
+My.Request <o> Remote request utility
+@*/
+My.Request = (function()
+    // ...
+    r
+)();
\ No newline at end of file