Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Suggestion: Allow json objects as payload #113
Wreck supports strings, buffers and streams as payload when doing a post/put/patch. I would suggest adding support for JSON objects, just because it would be beautiful to be able to write
Maybe implemented by calling
Just an idea.
@n321203 this is a common use case and I like the idea. I am happy to accept a PR for this with stringify. I just hope we don't end up with bugs from throws when people try to stringify objects with circular references, then we will end up needing something like safe stringify. We will want to make it clear in the documentation that we aren't doing anything to prevent the throw... and I would prefer to avoid adding another dependency.