Permalink
Browse files

update request

  • Loading branch information...
2 parents 4eae54a + 111182e commit 7067bfbcbed7c1c9882e9b0e6f82fac669ad8259 @twilson63 committed Mar 18, 2012
Showing with 81 additions and 20 deletions.
  1. +20 −0 LICENSE
  2. +1 −1 bin/get
  3. +5 −5 package.json
  4. +33 −14 readme.md
  5. +7 −0 test/get_spec.coffee
  6. +9 −0 test/get_spec.js
  7. +4 −0 test/mocha.opts
  8. 0 test/post_spec.coffee
  9. +2 −0 test/post_spec.js
View
@@ -0,0 +1,20 @@
+Copyright (c) 2011 Tom Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -4,4 +4,4 @@ var path = require('path')
, fs = require('fs')
, gp = require(path.join(path.dirname(fs.realpathSync(__filename)), '..'))
-gp.get(process.argv[2]).pipe(process.stdout);
+gp.get(process.argv[2]).pipe(process.stdout)
View
@@ -11,16 +11,16 @@
"url" : "git://github.com/twilson63/get-post.git"
},
"dependencies": {
- "request": "*"
+ "request": "2.9.153"
},
"devDependencies": {
- "coffee-script": ">= 1.x.x",
- "mocha": "*",
- "should": "*"
+ "coffee-script": "~1.2.x",
+ "mocha": "0.14.1",
+ "should": "0.6.0"
},
"bin": {
"get": "./bin/get",
"post": "./bin/post"
},
- "engines": { "node": ">= 0.4.11" }
+ "engines": { "node": "0.6 || 0.7 || 0.8" }
}
View
@@ -1,30 +1,49 @@
-# get-post json cli
+GET-POST
+========
-Simple NodeJs json http request command-line client. A cli
-wrapper around Request by Mikeal Rogers. Everything gets
-or posts via content-type application/json.
+Two CLI applications that connect to http servers using json
-# Installation
+## Installation
-```
+``` sh
npm install get-post -g
```
-# Usage
+## GET
-Do a simple get as 'application/json' :
+### Usage
+
+``` sh
+get http://twitter.com/search.json?q=nodejs
-```
-get "http://twitter.com/search.json?q=nodejs"
```
-Do a simple json post:
+## POST
+
+### Usage
+
+
+``` sh
+echo '{"Hello": "World"} | post http://echo-json.heroku.com
```
-post http://echo-json.heroku.com '{"hello":"world"}'
-```
-# Thanks
+## FAQ
+
+* Why?
+
+Because with curl I just got tired of typeing -H 'Content-Type: application/json'
+
+## Thanks
* Mikeal Rogers for Request
* Ryan Dahl for Nodejs
+
+## License
+
+See LICENSE
+
+## Contribute
+
+Contributions Welcome!
+
@@ -0,0 +1,7 @@
+{ get } = require '../index'
+describe 'GET CLI', ->
+ it 'should show name', (done) ->
+ # process.stdout.on "data", (chunked) ->
+ # chunked.should.eql("Hello World")
+ # done()
+ get("Hello World")
View
@@ -0,0 +1,9 @@
+var get;
+
+get = require('../index').get;
+
+describe('GET CLI', function() {
+ return it('should show name', function(done) {
+ return get("Hello World");
+ });
+});
View
@@ -1 +1,5 @@
+<<<<<<< HEAD
--require should
+=======
+--require should
+>>>>>>> 111182e9ea65cc06a062606426946652dd1167a0
No changes.
View
@@ -0,0 +1,2 @@
+
+

0 comments on commit 7067bfb

Please sign in to comment.