1
1
mirror of https://github.com/ariya/phantomjs.git synced 2024-09-19 16:48:07 +03:00
phantomjs/test
Milian Wolff 1411ebdff6 make POST/PUT data accessible from phantomjs server scripts
For POST and PUT request we now read all data as defined by
the Content-Length header into request.rawData property.
This property is a QByteArray which neatly maps to an array
in javascript.

For POST requests with Content-Type = applicaiton/x-www-form-urlencoded
we furthermore provide a parsed, easy-to-use request.post property.
This one is a QVariantMap of the decoded form data.

There is a new postserver.js example that shows the usage.

The unit test is extended to test the new (and old) features
of the server.

TODO: test that verifies proper decoding of UTF8 data, which
is not yet possible since I see no way to do a post-request
using phantomjs with an explicitly defined charset

ISSUE: 340 (http://code.google.com/p/phantomjs/issues/detail?id=340)
2012-02-15 18:41:51 -08:00
..
lib Filesystem API: completed the "Tests" API group from CommonJS/Filesystem definition. 2011-08-08 23:42:11 +01:00
fs-spec-01.js Implement charset param for fs.{open,read,write} 2012-02-03 00:44:14 +09:00
fs-spec-02.js Added "touch(path)" to the FS API 2011-09-01 00:34:55 +01:00
fs-spec-03.js Added "copyTree(source, destination)" to the set of File API. 2011-09-04 23:42:54 +01:00
fs-spec-04.js Filesystem API: completed the "Tests" API group from CommonJS/Filesystem definition. 2011-08-08 23:42:11 +01:00
module-spec.js basic unit test for webserver 2011-11-15 13:45:11 +01:00
phantom-spec.js Bump the unstable version to 1.4. 2011-10-29 11:18:50 -05:00
run-tests.js Passed test results failed count as exit code 2011-11-29 11:39:09 +02:00
webpage-spec.js make POST/PUT data accessible from phantomjs server scripts 2012-02-15 18:41:51 -08:00
webserver-spec.js make POST/PUT data accessible from phantomjs server scripts 2012-02-15 18:41:51 -08:00