gfredericks / vcr-clj

Generic IO playback for clojure
117 stars 20 forks source link

vcr-clj.core/with-cassette supports :arg-transformer option #22

Closed chairmank closed 7 years ago

chairmank commented 7 years ago

I added a new :arg-transformer option that is analogous to the existing :return-transformer option. During both recording and playback, the original arguments are interepted and replaced by (apply return-transformer args), and these transformed arguments are passed to arg-key-fn, recordable?, and the recorded function.

This feature is intended to enable serialization of HTTP request bodies for https://github.com/gfredericks/vcr-clj/issues/17

chairmank commented 7 years ago

I rebased on the current HEAD of master branch and fixed the mistake in the docstring.

gfredericks commented 7 years ago

Released as 0.4.11.