-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide utility functions for use as arg-key-fn in vcr-clj.clj-http/with-cassette #17
Comments
I've at least moved out the |
chairmank
added a commit
to chairmank/vcr-clj
that referenced
this issue
Apr 14, 2017
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 gfredericks#17
chairmank
added a commit
to chairmank/vcr-clj
that referenced
this issue
Apr 17, 2017
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 intercepted 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 gfredericks#17
chairmank
added a commit
to chairmank/vcr-clj
that referenced
this issue
Apr 17, 2017
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 intercepted 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 gfredericks#17
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The default
arg-key-fn
invcr-clj.clj-http/with-casette
is an anonymous functionUsers would benefit from having access to this function as a public
default-arg-key-fn
var in this namespace, which they can use as a building block for their own customized key functions.Often, users want to test that the paylod of a HTTP request satisfies an expectation. This is a common enough use case, and the implementation is tricky enough, that
vcr-clj.clj-http
ought to expose another built-in key function that serializes the body of the request (if one is present). If reading the body is a destructive operation, this function needs to replace the body with a fascimile that resembles the original, unread body.The text was updated successfully, but these errors were encountered: