1.0.1 • Published 10 years ago

snooze-request v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
10 years ago

snooze-request

A simple wrapper for the NPM module request.

Install

Install with npm

npm install snooze-request --save

Use

Inject the module into your snooze module

require('snooze-request');
snooze.module('MyModule', ['snooze-request']);

Ready to use.

snooze.module('MyModule').service('MyServ', function($request) {
  return {
    getGoogle: function() {
      $request('http://www.google.com', function (error, response, body) {
        if (!error && response.statusCode == 200) {
          console.log(body) // Print the google web page.
        }
      });
    }
  };
});

Documentation

See official request documentation

https://github.com/request/request

1.0.1

10 years ago

1.0.0

10 years ago