Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eldoy/taarn
Light weight isomorphic HTTP Client
https://github.com/eldoy/taarn
Last synced: 6 days ago
JSON representation
Light weight isomorphic HTTP Client
- Host: GitHub
- URL: https://github.com/eldoy/taarn
- Owner: eldoy
- License: mit
- Created: 2018-09-25T00:07:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-05T16:48:07.000Z (about 3 years ago)
- Last Synced: 2024-09-30T11:09:41.891Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 994 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Light weight isomorphic HTTP Client
Does ajax and uploads from the browser and NodeJS. Support for file upload progress with percentage.
### INSTALLATION
```npm i taarn```### USAGE
On your Node.js server:
```js
var taarn = require('taarn')// Normal usage
var data = await taarn(url, params, options)// Usage with default options shown
var url = 'https://example.com'
var data = await taarn(
url,
{ data: { hello: 'world' } },
{
method: 'POST',
path: '/',
files: ['filename.txt'],
progress: function(event) {
console.log(event.percent, event.total, event.loaded)
}
}
)
```MIT Licensed.Enjoy!