tikan / rmock

GNU Lesser General Public License v3.0
2 stars 2 forks source link

HTTP runner: deprecate params parsers in favour of custom protocols #4

Open amgaera opened 11 years ago

amgaera commented 11 years ago

HTTP requests need to be translated into function calls before they can be recorded. Right now there are two ways of implementing this conversion: one can either write a new protocol, or use the predefined RawProtocol with a custom params parser. None of these methods is significantly better than the other, and the choice between them introduces unnecessary confusion.

To simplify the API, I propose to deprecate params parsers in favour of custom protocols. To make writing the latter easier, a base class for all protocols (e.g. with a default implementation of the dumps method) could be introduced.