https://github.com/dhellmann/wsme-experimentation
sandbox for experimenting with wsme
https://github.com/dhellmann/wsme-experimentation
Last synced: 11 months ago
JSON representation
sandbox for experimenting with wsme
- Host: GitHub
- URL: https://github.com/dhellmann/wsme-experimentation
- Owner: dhellmann
- Created: 2013-01-02T16:04:12.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-02T20:14:04.000Z (over 13 years ago)
- Last Synced: 2025-06-07T03:36:53.523Z (about 1 year ago)
- Language: Python
- Size: 156 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
WSME Experimentation
====================
This repo contains some test files for experimenting with WSME and
Pecan. To use them, first run
$ python setup.py develop
to install the dependencies and configure the test app.
Then start the server in one window with
$ pecan serve config.py
and run the client in another window with
$ python client.py
The output will look like
HTTP GET Strings, using indexes
URL : http://127.0.0.1:8080/strings?input%5B1%5D=b&input%5B0%5D=a
TEXT: u'["a", "b"]'
JSON: [u'a', u'b']
HTTP GET Pairs, using indexes
URL : http://127.0.0.1:8080/pairs?input%5B0%5D.right=A&input%5B1%5D.right=B&input%5B0%5D.left=a&input%5B1%5D.left=b
TEXT: u'[{"right": "A", "left": "a"}, {"right": "B", "left": "b"}]'
JSON: [{u'right': u'A', u'left': u'a'}, {u'right': u'B', u'left': u'b'}]
HTTP GET Strings, without indexes, one
URL : http://127.0.0.1:8080/strings?input=a
TEXT: u'["a"]'
JSON: [u'a']
HTTP GET Strings, without indexes, multiple
URL : http://127.0.0.1:8080/strings?input=a&input=b
TEXT: u'["a", "b"]'
JSON: [u'a', u'b']
HTTP GET Strings, without indexes, multiple, list (BROKEN)
URL : http://127.0.0.1:8080/strings?input=b
TEXT: u'["b"]'
JSON: [u'b']
HTTP GET Pairs, without indexes, separate lists
URL : http://127.0.0.1:8080/pairs?input.left=a&input.left=b&input.right=A&input.right=B
TEXT: u'[{"right": "A", "left": "a"}, {"right": "B", "left": "b"}]'
JSON: [{u'right': u'A', u'left': u'a'}, {u'right': u'B', u'left': u'b'}]
HTTP GET Pairs, without indexes, hand-encoded
URL : http://127.0.0.1:8080/pairs?input.left=a&input.right=A&input.left=b&input.right=B
TEXT: u'[{"right": "A", "left": "a"}, {"right": "B", "left": "b"}]'
JSON: [{u'right': u'A', u'left': u'a'}, {u'right': u'B', u'left': u'b'}]
HTTP GET Pairs, without indexes, tuples (BROKEN)
URL : http://127.0.0.1:8080/pairs?input.left=b&input.right=B
TEXT: u'[{"right": "B", "left": "b"}]'
JSON: [{u'right': u'B', u'left': u'b'}]
HTTP GET Pairs, without indexes, nested dicts (BROKEN)
URL : http://127.0.0.1:8080/pairs?input=right&input=left&input=right&input=left
TEXT: u'{"debuginfo": null, "faultcode": "Server", "faultstring": "__init__() takes exactly 1 argument (2 given)"}'
JSON: {u'debuginfo': None, u'faultcode': u'Server', u'faultstring': u'__init__() takes exactly 1 argument (2 given)'}
HTTP GET Pairs, without indexes, nested dicts, 2 (BROKEN)
URL : http://127.0.0.1:8080/pairs?input%5B1%5D=right&input%5B1%5D=left&input%5B0%5D=right&input%5B0%5D=left
TEXT: u'{"debuginfo": null, "faultcode": "Client", "faultstring": "Unknown argument: \\"input[1], input[0]\\""}'
JSON: {u'debuginfo': None, u'faultcode': u'Client', u'faultstring': u'Unknown argument: "input[1], input[0]"'}