-
Notifications
You must be signed in to change notification settings - Fork 165
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
Axios #208
Conversation
Hi, how is the status of this branch? I've run my tests against it and noticed that errors aren't forwarded from CouchDB as they have been before. For example, the response for
but that's currently missing. |
@LyteFM Good point. I've added quick change to ensure that the Error object thrown during errors contains attributes received in the response. |
Great, works for me now - but the error response for |
Thanks @LyteFM. Another commit (or two) to correct what happens when there is no response body (as with a HEAD /db/id request). |
* fix(nano.d.ts): add opts and callback for nano.request * fix(nano.d.ts): add opts and callback for relax and dinosaur
I have been waiting for this PR to be merged/released, to consume |
addresses #219
- Added test case for viewWithListAsStream - Added documntation for viewWithListm and viewWithListAsStream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a massive effort. Great work Glynn.
Just some extra housekeeping because of the master/main switchover. |
Overview
The request module is deprecated. This pull request will aim to replace request with axios. I tried to do this work inside of the "relax" function so that all the callers of the relax function stay the same. Only the
db.copy
had to be removed because the COPY method is not supported by axios.As this project's dependency "cloudant-follow" is also a user of request (and is becoming deprecated itself), the 'follow*' functions of this library are also deprecated and replaced with new 'changesReader' functions which I wrote myself and have plumbed into the library.
I also took the opportunity of removing extraneous dependencies (Nano now only has 2 dependencies), fixed up the logging module and improved the README.
Testing recommendations
npm run test
GitHub issue number
#196
Checklist