summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTapani Mikola <tapani.mikola@nokia.com>2009-09-10 19:38:30 (GMT)
committerTapani Mikola <tapani.mikola@nokia.com>2009-09-18 07:02:04 (GMT)
commit6c52d48a5ed07a3ed21f5b74315ba6fcf06eaada (patch)
treee2f5c9ac18e88e4899a1c7362e18f20f9babe5ce /examples
parent6d0211d01269273392c0ce9997987e5d68e4d114 (diff)
downloadQt-6c52d48a5ed07a3ed21f5b74315ba6fcf06eaada.zip
Qt-6c52d48a5ed07a3ed21f5b74315ba6fcf06eaada.tar.gz
Qt-6c52d48a5ed07a3ed21f5b74315ba6fcf06eaada.tar.bz2
Implementations of getAllResponseHeaders () and getResponseHeader ().
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/xmlhttprequest/test.qml12
1 files changed, 11 insertions, 1 deletions
diff --git a/examples/declarative/xmlhttprequest/test.qml b/examples/declarative/xmlhttprequest/test.qml
index 56366d6..18447e5 100644
--- a/examples/declarative/xmlhttprequest/test.qml
+++ b/examples/declarative/xmlhttprequest/test.qml
@@ -9,12 +9,22 @@ Rectangle {
var doc = new XMLHttpRequest();
doc.onreadystatechange = function() {
- if (doc.readyState == XMLHttpRequest.DONE) {
+ if (doc.readyState == XMLHttpRequest.HEADERS_RECEIVED) {
+ print ("Headers -->");
+ print (doc.getAllResponseHeaders ());
+ print ("Last modified -->");
+ print (doc.getResponseHeader ("Last-Modified"));
+ }
+ else if (doc.readyState == XMLHttpRequest.DONE) {
var a = doc.responseXML.documentElement;
for (var ii = 0; ii < a.childNodes.length; ++ii) {
print (a.childNodes[ii].nodeName);
}
+ print ("Headers -->");
+ print (doc.getAllResponseHeaders ());
+ print ("Last modified -->");
+ print (doc.getResponseHeader ("Last-Modified"));
}
}