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

                "text"
            else if responseBodyType == "json"
                "text"
            else
                reject(new Error("error")); return
        xhr.timeout = timeout ? 0
        xhr.onload = ->
            response =

                                data.toString()
                            else if responseBodyType == "json"
                                JSON.parse(data.toString())
                    if (200 <= response.statusCode < 300)
                        resolve(response)
                    else
