Skip to content
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

Extension providing a declarative, uncurried API for Superagent #1332

Closed
damoclark opened this issue Jan 16, 2018 · 3 comments
Closed

Extension providing a declarative, uncurried API for Superagent #1332

damoclark opened this issue Jan 16, 2018 · 3 comments

Comments

@damoclark
Copy link
Contributor

Hey @kornelski

Not an issue, but just letting you know I have published a companion module for superagent called superagent-declare. It provides a declarative, uncurried API for Superagent. e.g.

const superagent = require('superagent') ;
const request = require('superagent-declare') ;
request.use(superagent) ;
request({
	post: '/upload',
	field: [
		['user[name]', 'Tobi'],
		['user[email]', '[email protected]'],
		['friends[]', ['loki', 'jane'] ],
	],
	attach: ['image', 'path/to/tobi.png'],
	then: callback
}) ;

It is published on npm and github.

Raising this issue, just in case you wanted to make reference to it in Superagent's documentation.

Cheers,
Damien.

@kornelski
Copy link
Contributor

Thanks. If you'd like, make a PR to add it to the list of plugins in the readme.

@damoclark
Copy link
Contributor Author

No worries. Happy to do that.

D.

@niftylettuce
Copy link
Collaborator

added to docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants