aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders_sent.qml
blob: 27edb4c4b745ccf6e2078a4b45041adc2d5322b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import QtQuick 2.0

QtObject {
    property bool test: false

    Component.onCompleted: {
        var x = new XMLHttpRequest;

        x.open("GET", "testdocument.html");
        x.send();

        try {
            x.getAllResponseHeaders();
        } catch (e) {
            if (e.code == DOMException.INVALID_STATE_ERR)
                test = true;
        }
    }
}