Skip to content

dkhunt27/simple-http-utilities

Repository files navigation

###NPM version Build Status

simple-http-utilities

Perform simple javascript validation like isEmpty and isDefined in a consistent manner.

Please see the docs/index.html for more details. If link does not work, just open the index.html in the docs folder.

Installation

npm install simple-http-utilities

Usage

  var shu = require('simple-http-utilities');
  
	var buildInputs = {
		host: "someHost",
		port: 443,
		path: "/some/path"
	};
  var options = shu.buildOptions(buildInputs);
  
	var getInputs = {
		useHttps: true,
		options: options
	};
    
	shu.get(getInputs, function (err, results) {
		if (err) {
			// error handling
		}
		
		var statusCode = results.statusCode;
		var response = results.response;
		
		// response handling
		
	});

Road Map

1.0 buildOptions, get, getJson, post, postJson, and put functions.
100% unit test coverage.
Use grunt to build, minify, test, jshint, and publish package.
Publish to npm with only required files.
Documentation on installation, use cases, and code examples.

Note to myself

  • Make sure working in dev branch
  • When updates are complete, run "grunt test" to verify all tests are passing.
  • Run "grunt hint" to verify all jshint checks are passing.
  • Run "grunt bump" to update version (grunt bump:patch, grunt bump:minor) or update package.json directly
  • Update release history and version ref at top of js file
  • Then run "grunt release".
  • When it is complete, git commit, git push, and git push --tags
  • Wait for travis build confirmation
  • Make pull request to master
  • Wait for travis build confirmation
  • Pull down master locally
  • Just to verify, run "grunt test" to verify all tests are passing. Run "grunt hint" to verify all jshint checks are passing.
  • Run "npm publish"
  • Go back to dev branch
  • Cele!!!

Release History

0.2.1 2015/07/09 Initial Release.
buildOptions, get, getJson, post, postJson, and put functions.
Little test coverage.
Uses grunt to build, minify, test, jshint, and publish package.
Also using travis for CI.
Initial documentation.

About

Simple http wrapper library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published