~leonardr/lazr.restful/version-specific-request-interface

« back to all changes in this revision

Viewing changes to src/lazr/restful/docs/webservice.txt

  • Committer: Leonard Richardson
  • Date: 2009-10-07 17:57:59 UTC
  • mfrom: (79.1.2 forward-port)
  • Revision ID: leonard.richardson@canonical.com-20091007175759-elso1usuu5y3xe8b
[r=allenap,deryck] Split the authentication middleware into a new library, lazr.authentication. Fix a bug that choked on some incoming UTF-8 strings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1815
1815
 
1816
1816
A PATCH request will automatically result in a modification event
1817
1817
being sent out about the modified object, which means that
1818
 
modify_cookbook() will be run. Here, we modify the name of one of the
1819
 
cookbooks.
 
1818
modify_cookbook() will be run. Here, we modify the name and the
 
1819
cuisine of one of the cookbooks. Note that the cuisine contains
 
1820
non-ASCII characters.
1820
1821
 
1821
1822
    >>> headers = {'CONTENT_TYPE' : 'application/json'}
1822
 
    >>> body = '{"name" : "The Joy of Cooking (revised)"}'
 
1823
    >>> body = '''{"name" : "The Joy of Cooking (revised)",
 
1824
    ...            "cuisine" : "\xd7\x97\xd7\x95\xd7\x9e\xd7\x95\xd7\xa1"}'''
1823
1825
 
1824
1826
    >>> patch_request = create_web_service_request(
1825
1827
    ...     '/beta/cookbooks/The%20Joy%20of%20Cooking', body=body,