     catch ex
         reject(ex)
 )
-web.get = (url, options) ->
+web.get = (uri, options) ->
     actualOptions =
         method: "GET"
-        url: url
+        uri: uri
     Object.assign(actualOptions, options)
     web.request(actualOptions)
-web.jsonGet = (url, options) ->
+web.jsonGet = (uri, options) ->
     actualOptions =
         method: "GET"
-        url: url
+        uri: uri
         responseBodyType: "json"
     Object.assign(actualOptions, options)
     web.request(actualOptions)
-web.binaryGet = (url, options) ->
+web.binaryGet = (uri, options) ->
     actualOptions =
         method: "GET"
-        url: url
+        uri: uri
         responseBodyType: "binary"
     Object.assign(actualOptions, options)
     web.request(actualOptions)
-web.post = (url, body, options) ->
+web.post = (uri, body, options) ->
     actualOptions =
         method: "POST"
-        url: url
+        uri: uri
         body: body
     Object.assign(actualOptions, options)
     web.request(actualOptions)
-web.jsonPost = (url, body, options) ->
+web.jsonPost = (uri, body, options) ->
     actualOptions =
         method: "POST"
-        url: url
+        uri: uri
         headers: {"Content-Type": "application/json"}
         body: JSON.stringify(body)
         responseBodyType: "json"

            http = module.require("http")
            https = module.require("https")
            urlMod = module.require("url")
            parsedUrl = urlMod.parse(url)
            httpOrHttps = if parsedUrl.protocol == "https:" then https else http
            rawRequest = httpOrHttps.request(
                {
                    method: method
                    hostname: parsedUrl.hostname
                    port: parsedUrl.port
                    path: parsedUrl.path
                    headers: headers
                },
                (rawResponse) ->

web.request = (options) -> new Promise((resolve, reject) ->
    try
        method = options.method
        uri = options.uri
        headers = options.headers ? null
        body = options.body ? null
        timeout = options.timeout ? null
        responseBodyType = options.responseBodyType ? "text"
        if not method?
            fail()
        if not uri?
            fail()
        if body? and typeof body != "string" and body not instanceof Uint8Array
            fail()
