has been testing the client's ExtJS, but encountered the server side of the trouble, to build a library, to write JSON, to have the HTTP return value.
Today, a simple method was tested and it was OK to test it.
That is, Python's Simplehttpserver module as a simple Web server, and then, you need to return the value directly to write an HTML.
Specify the startup command for the directory:
Python-m Simplehttpserver
If you want to test AJAX requests like the following ExtJS:
<! DOCTYPE html>You can generate a source.html file under the sibling code directory with the following content:
{users:[{name: ' Qeefee ', age:1}, {name: ' Chengang ', age:18}, {name: ' Sky ', age:31}, {name: ' CK ', age:65}, {name: ' GK ', age : +}, {name: ' Bone ', age:15}, {name: ' Tom ', age:26}]}
The effect is as follows: Get it done!! :)
Haha, find a way to simply simulate the Ajax interaction with the server in ExtJS.