+# According to RFC-7230, for HTTP response status we use "status reason"
+# instead of status text or status message.
+
 global.web = {}
 web.request = (options) ->
     method = options.method

    timeout = options.timeout ? null
    responseBodyType = options.responseBodyType ? "text"
    new Promise((resolve, reject) ->
        if mate.environmentType == "browser"
            xhr = new XMLHttpRequest()
            xhr.open(method, url)
            if headers?

            xhr.onload = ->
                response =
                    statusCode: xhr.status
                    statusReason: xhr.statusText
                    headers:
                        xhr.getAllResponseHeaders()
                        .stripTrailingNewline()
                        .splitDeep("\r\n", ": ", 1)
                        .map((header) -> [header[0].toLowerCase(), header[1]])
                        .toObject()
                    body:
                        if responseBodyType == "binary"
