Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tcr/rem
HTTP clients with middleware for Node.js and web browsers. Flexible for any HTTP request, customizable for building API clients, and supports OAuth.
https://github.com/tcr/rem
Last synced: about 1 month ago
JSON representation
HTTP clients with middleware for Node.js and web browsers. Flexible for any HTTP request, customizable for building API clients, and supports OAuth.
- Host: GitHub
- URL: https://github.com/tcr/rem
- Owner: tcr
- License: mit
- Created: 2012-01-11T22:34:36.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2014-08-16T09:43:43.000Z (over 10 years ago)
- Last Synced: 2024-04-29T17:08:08.520Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.05 MB
- Stars: 25
- Watchers: 4
- Forks: 11
- Open Issues: 40
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-repos - tcr/rem - HTTP clients with middleware for Node.js and web browsers. Flexible for any HTTP request, customizable for building API clients, and supports OAuth. (JavaScript)
README
# Rem 0.6
An HTTP Client with middleware, with built-in support for major web services.
To use Rem with Node.js, install using `npm`:
npm install rem
To use in the browser, include `lib/rem.js`.
## Getting Started
A Node.js script to access and configure the Github API, in just 6 lines:
```javascript
var rem = require('rem');
rem.connect('github.com').prompt(function (err, user) {
user('user').get(function (err, profile) {
console.log('Hello %s!', profile.name);
});
});
````rem.connect('github.com')` creates a Github API Client. `prompt` asks you for API configuration and prompts you to log in. `user` is an authenticated API that can access [endpoints like `'user'`](http://developer.github.com/v3/users/#get-the-authenticated-user), returning a JSON blob like `profile.name`.
## Documentation
Look at [**the Wiki for API Documentation**](https://github.com/tcr/rem/wiki).
* See [code for popular REST services](https://github.com/tcr/rem/tree/master/examples/services).
* See [code for using Rem to authenticate users](https://github.com/tcr/rem/tree/master/examples/auth) with Express, from the command line, or out-of-band login.
* See [code for using Rem in the browser](https://github.com/tcr/rem/tree/master/examples/browser).## License
MIT.