0

How can I use the 'request' node.js module on the front-end?

normally I would retrieve it like so:

var request = require('request');

but this is not possible on the front-end since require is not recognized.

What is the best way to solve this?

1 Answer 1

2

To use node modules in the browser you can use a library called Browserify . This allows you to work with the common module pattern as well as the you can use this package browser-request to get the features of request module

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.