diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml')
-rw-r--r-- | tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml new file mode 100644 index 00000000..3dd851e5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml @@ -0,0 +1,22 @@ +import QtQuick 1.0 + +QtObject { + property string url + + property bool dataOK: false + + Component.onCompleted: { + var x = new XMLHttpRequest; + x.open("POST", url); + x.setRequestHeader("Accept-Language","en-US"); + + // Test to the end + x.onreadystatechange = function() { + if (x.readyState == XMLHttpRequest.DONE) { + dataOK = (x.responseText == "QML Rocks!\n"); + } + } + + x.send("My Sent Data"); + } +} |