Skip to content

Instantly share code, notes, and snippets.

@ryanburnette
Created December 26, 2017 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanburnette/8a6ac66c2bf52e907bfcea80f678cab1 to your computer and use it in GitHub Desktop.
Save ryanburnette/8a6ac66c2bf52e907bfcea80f678cab1 to your computer and use it in GitHub Desktop.
function objectToFormData(obj) {
var pieces = [];
Object.keys(fd).forEach(function (key) {
pieces.push(`${key}=${fd[key]}`);
});
return pieces.join('&');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment