Skip to content

Instantly share code, notes, and snippets.

@Marsup
Created September 20, 2012 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Marsup/3754356 to your computer and use it in GitHub Desktop.
Save Marsup/3754356 to your computer and use it in GitHub Desktop.
request + connect bodyParser with 'json:true' issue
var connect = require('connect')
, http = require('http')
, request = require('request').defaults({ json: true })
var app = connect().use(connect.bodyParser())
, server = http.createServer(app)
server.listen(7777, function() {
request('http://localhost:7777')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment