inorganik / digest-auth-request

Make digest-auth requests with vanilla javascript
MIT License
70 stars 49 forks source link

new digestAuthRequest reference not found when using the code given in example #21

Closed RjNayak closed 8 years ago

RjNayak commented 8 years ago

Hi,

I am new to Node js and trying to make a digest auth POST request.I am using Node js with express. I tried the code given in example but getting a reference not found error. Could you please help me how to use this module after installing from npm registry ?

ReferenceError: digestAuthRequest is not defined

inorganik commented 8 years ago

That error means the script isn't getting included, so check your linking.

RjNayak commented 8 years ago

Hi ,

I can understand the script is not getting included . As per my understanding all the npm modules are imported using the require() but in the example given there is no such statements. So could you please guide how to include this script in a node js project?

Thanks ,

Rajesh

inorganik commented 8 years ago

You still have to make a script link in your html document. npm just ensures you have the script.

RjNayak commented 8 years ago

Hi, I have linked the file now but when executing getting below error.

ReferenceError: XMLHttpRequest is not defined at digestAuthRequest.makeUnauthenticatedRequest (evalmachine.:49:27) at digestAuthRequest.request (evalmachine.:43:9)

Note: I dont have HTMl files. I am calling the digest-auth-request in siade another javascript file.

inorganik commented 8 years ago

I can help you with using this repo but if you need help with setting up an express project, or some other framework, this is not the place to get support.

Good luck!