novagile/diecutter — pull request #9 by benoitbryon (2013-01-23 18:03:32+00:00)
Title: Refs #8 - Introduced support of INI files as input for POST requests

Draft implementation of #8.
Since many other content-types could be supported, I introduced "pluggable context extractors" that can be configured. Currently, it's just a mapping between content types and Python callables.

@Natim: what do you think about the switch on "content-type" header?

I'm not sure about the "text/ini" content type... doesn't look standard.

Needs a bit of refactoring: move context extractors in separate module(s).

Needs examples in README, demo project...
Needs an example with curl taking content from a file like `curl -d "@path/to/file"` or from standard input like `curl -d "@-"`. And maybe the same with wget.

Needs tests too!