                                 data.toString()
                             else if responseBodyType == "json"
                                 JSON.parse(data.toString())
-                            else
-                                reject(new Error("error")); return
                     if (200 <= response.statusCode < 300)
                         resolve(response)
                     else

    responseBodyType = options.responseBodyType ? "text"
    if body? and typeof body != "string" and body not instanceof Uint8Array
        reject(new Error("error")); return
    if mate.environmentType == "browser" then do ->
        xhr = new XMLHttpRequest()
        xhr.open(method, url)

                "text"
            else if responseBodyType == "json"
                "text"
        xhr.timeout = timeout ? 0
        xhr.onload = ->
            response =
