Open deadnight7 opened 2 years ago
Update the README docs needs to be updated I tried doing a named export, which should have been default export in httpsnippet library, like this
const HTTPSnippet = require('httpsnippet')
Did you ever get this working? It worked for me prior to v3, but now I get the same:
const HTTPSnippet = require('httpsnippet');
const snippet = new HTTPSnippet({
method: 'GET',
url: 'http://mockbin.com/request',
});
Results in:
TypeError: HTTPSnippet is not a constructor
The library is not getting instantiated, Created a basic node project and trying to instantiate the library. Does not work.
index.js
Package JSON
Getting this below error