Add documentation on how to POST with curl

Issue #72 invalid
Yann Malet created an issue

This is somehow related to #71. This ticket has been solved by removing the decorator require_extended.

It would be great if you could add somewhere in the doc an explanation on how to use curl to create a blog entry in the blogserver example using JSON and YAML.

thank you

Comments (1)

  1. Yann Malet reporter

    I think I have finally understood the problem for the sake of completeness here it is the curl command and the handler :

    curl v -u testuser:foobar -H 'Content-Type:application/json' -X POST -d '{"content": "second test", "title": "second test"}'
        def create(self, request):
            Creates a new blogpost.
            attrs = self.flatten_dict(
            if self.exists(**attrs):
                return rc.DUPLICATE_ENTRY
                post = Blogpost(title=attrs['title'], 
                return post
  2. Log in to comment