{"name":"http-sync","version":"0.0.4","description":"A synchronous HTTP Client library for node.js","main":"http-sync.js","scripts":{"install":"node-gyp rebuild"},"repository":{"type":"git","url":"git://github.com/dhruvbird/http-sync.git"},"author":{"name":"Dhruv Matani"},"contributors":[{"name":"Sean Massa","email":"endangeredmassa@gmail.com","url":"http://massalabs.com/"},{"name":"Taro Kobayashi","email":"9re.3000@gmail.com","url":"http://tech.kayac.com/"},{"name":"Charles Bourasseau","url":"https://github.com/cbou"}],"license":"BSD","gypfile":true,"bugs":{"url":"https://github.com/dhruvbird/http-sync/issues"},"_id":"http-sync@0.0.4","dist":{"shasum":"f2821dcb997b83baf1f7c859394ed6af113ad558","tarball":"http://registry-npm.ywwl.com/http-sync/download/http-sync-0.0.4.tgz","integrity":"sha512-g08XjcJ7Dt8/jvHT1kZ6Ahz7UWSRjnrRha+dgkiXjFc4JgHLESiF40upvjZ43By4dVU7IlZ5Tfz2JdxKWhynUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkWNLEwfc/R5QLv6CKk1hcD/U5vVFEzYZ5SD7F2bqHygIhALF0+08CSTGs9+6cqfCKq2PtrqR87b5R/d7E42AqKBtu"}],"size":6381,"noattachment":false,"key":"/http-sync/-/http-sync-0.0.4.tgz"},"_from":"https://github.com/dhruvbird/http-sync/archive/v0.0.4.tar.gz","_resolved":"https://github.com/dhruvbird/http-sync/archive/v0.0.4.tar.gz","_npmVersion":"1.3.8","_npmUser":{"name":"dhruvbird","email":"dhruvbird@gmail.com"},"maintainers":[{"name":"dhruvbird","email":"dhruvbird@gmail.com"}],"directories":{},"readme":"# http-sync\n\nhttp-sync is a compiled Node.js extension that provides syncronous http calls.\n\n# Installing\n\nYou must have libcurl installed in order to compile this extension.\n\nOn Ubuntu, you can run: `sudo apt-get install libcurl4-openssl-dev`\nOn CentOS, you can run: `sudo yum install libcurl libcurl-devel`\n\n# Using\n\n```javascript\n// example with default options\nhttpSync = require('http-sync');\n\nvar request = httpSync.request({\n    method: 'GET',\n    headers: {},\n    body: '',\n\n    protocol: 'http',\n    host: '127.0.0.1',\n    port: 80, //443 if protocol = https\n    path: '/'\n});\n\nvar timedout = false;\nreq.setTimeout(10, function() {\n    console.log(\"Request Timedout!\");\n    timedout = true;\n});\nvar response = request.end();\n\nif (!timedout) {\n    console.log(response);\n    console.log(response.body.toString());\n}\n```\n\n# SSL/TLS Options\n\nIf you require the use of a private CA or client certificate authentication, the following options are available:\n\n* pfx - Path to certificate, private key and CA certificates to use\n* ca - Path to an authority certificate\n* cert - Path to the public x509 client certificate to use\n* key - Path to the private key used for SSL\n* passphrase - A string of passphrase for the private key or pfx, if required\n\n```javascript\n// example with a private CA and client cert authentication\nhttpSync = require('http-sync');\n\nvar request = httpSync.request({\n    method: 'GET',\n    headers: {},\n    body: '',\n\n    protocol: 'https',\n    host: '127.0.0.1',\n    port: 443, // protocol = https\n    path: '/',\n    ca: '/path/to/CA',\n    cert: '/path/to/crt',\n    key: '/path/to/key',\n    rejectUnauthorized: true\n});\n\nvar timedout = false;\nreq.setTimeout(10, function() {\n    console.log(\"Request Timedout!\");\n    timedout = true;\n});\nvar response = request.end();\n\nif (!timedout) {\n    console.log(response);\n    console.log(response.body.toString());\n}\n```\n\n# Contributing\n\n## node >= v0.8.0\n\n`node-gyp configure && node-gyp build`\n\n## node < v0.8.0\n\nYou will need:\n\n* node.js source code\n* v8 source code\n* libcurl development package\n\nBuilding:\n\n    node-waf configure && node-waf build\n\n## testing\n\nRun the test.js file:\n\n    node test.js\n","publish_time":1383110595846,"_cnpm_publish_time":1383110595846,"dist-tags":{"latest":"0.1.2"}}