{"_id":"hock","_rev":"2942289","name":"hock","description":"A mocking server for HTTP requests","dist-tags":{"latest":"1.4.1"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"time":{"modified":"2023-04-21T09:33:07.000Z","created":"2013-05-01T00:01:42.627Z","1.4.1":"2020-04-08T22:47:32.723Z","1.4.0":"2020-02-25T22:52:43.348Z","1.3.3":"2018-08-06T16:10:58.868Z","1.3.2":"2016-08-23T00:54:49.759Z","1.3.1":"2016-03-18T21:32:40.043Z","1.3.0":"2016-03-18T16:47:18.444Z","1.2.0":"2015-01-23T15:49:18.310Z","1.1.0":"2014-12-27T15:52:23.912Z","1.0.0":"2014-09-08T14:53:00.229Z","0.2.5":"2014-03-13T17:51:06.208Z","0.2.4":"2014-01-14T01:14:52.311Z","0.2.3":"2014-01-13T18:33:26.336Z","0.2.2":"2014-01-07T04:18:04.297Z","0.2.1":"2013-12-10T15:36:27.882Z","0.2.0":"2013-06-13T12:48:10.897Z","0.1.2":"2013-05-02T23:37:44.809Z","0.1.1":"2013-05-02T23:27:11.998Z","0.1.0":"2013-05-01T00:01:42.627Z"},"users":{},"author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/mmalecki/hock.git"},"versions":{"1.4.1":{"name":"hock","description":"A mocking server for HTTP requests","version":"1.4.1","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"devDependencies":{"mocha":"^2.1.0","request":"2.20.x","should":"^13.2.3","should-http":"^0.1.1"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"dependencies":{"deep-equal":"0.2.1","url-equal":"0.1.2-1"},"gitHead":"88741858ea48a6c5522f318c117402d13b05ecd0","bugs":{"url":"https://github.com/mmalecki/hock/issues"},"homepage":"https://github.com/mmalecki/hock#readme","_id":"hock@1.4.1","_nodeVersion":"13.3.0","_npmVersion":"6.13.7","dist":{"shasum":"208b755800b6465affac25e50f48789eb151c475","size":10289,"noattachment":false,"key":"/hock/-/hock-1.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-1.4.1.tgz"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"_npmUser":{"name":"mmalecki","email":"me@mmalecki.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hock_1.4.1_1586386052562_0.9360032288184463"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:23:51.026Z","publish_time":1586386052723,"_cnpm_publish_time":1586386052723},"1.4.0":{"name":"hock","description":"A mocking server for HTTP requests","version":"1.4.0","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"devDependencies":{"mocha":"^2.1.0","request":"2.20.x","should":"^13.2.3","should-http":"^0.1.1"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"dependencies":{"deep-equal":"0.2.1","url-equal":"0.1.2-1"},"gitHead":"d1003cfe492f0b3b8429bc8f55d7c8600d8eabb5","bugs":{"url":"https://github.com/mmalecki/hock/issues"},"homepage":"https://github.com/mmalecki/hock#readme","_id":"hock@1.4.0","_nodeVersion":"13.3.0","_npmVersion":"6.13.7","dist":{"shasum":"f6925acdbfa39c3bfc3504b7db557d9033890fcf","size":9979,"noattachment":false,"key":"/hock/-/hock-1.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-1.4.0.tgz"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"_npmUser":{"name":"mmalecki","email":"me@mmalecki.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hock_1.4.0_1582671163233_0.38516439601696373"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:23:50.165Z","publish_time":1582671163348,"_cnpm_publish_time":1582671163348},"1.3.3":{"name":"hock","description":"A mocking server for HTTP requests","version":"1.3.3","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"devDependencies":{"mocha":"^2.1.0","request":"2.20.x","should":"^13.2.3","should-http":"^0.1.1"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"dependencies":{"deep-equal":"0.2.1","url-equal":"0.1.2-1"},"gitHead":"0e8f4371248f81a5172d35aba8a1b282a650c85f","bugs":{"url":"https://github.com/mmalecki/hock/issues"},"homepage":"https://github.com/mmalecki/hock#readme","_id":"hock@1.3.3","_npmVersion":"6.2.0","_nodeVersion":"10.0.0","_npmUser":{"name":"mmalecki","email":"me@mmalecki.com"},"dist":{"shasum":"6961e3df0529b2ed3cbc13e4b8d81fbd88b9c60d","size":9888,"noattachment":false,"key":"/hock/-/hock-1.3.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-1.3.3.tgz"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hock_1.3.3_1533571858522_0.1998626560662755"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:23:49.275Z","publish_time":1533571858868,"_cnpm_publish_time":1533571858868},"1.3.2":{"name":"hock","description":"A mocking server for HTTP requests","version":"1.3.2","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"git+ssh://git@github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"devDependencies":{"mocha":"^2.1.0","request":"2.20.x","should":"^5.0.1","should-http":"0.0.2"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"dependencies":{"deep-equal":"0.2.1"},"gitHead":"d632a61ec13cde8120700c4f9b9a60097549aeed","bugs":{"url":"https://github.com/mmalecki/hock/issues"},"homepage":"https://github.com/mmalecki/hock#readme","_id":"hock@1.3.2","_shasum":"6ed3e8be42b466798118d12150aa80e8d6ef2219","_from":".","_npmVersion":"3.10.6","_nodeVersion":"5.9.1","_npmUser":{"name":"mmalecki","email":"me@mmalecki.com"},"dist":{"shasum":"6ed3e8be42b466798118d12150aa80e8d6ef2219","size":9633,"noattachment":false,"key":"/hock/-/hock-1.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-1.3.2.tgz"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/hock-1.3.2.tgz_1471913687833_0.46008646581321955"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:48.076Z","publish_time":1471913689759,"_cnpm_publish_time":1471913689759},"1.3.1":{"name":"hock","description":"A mocking server for HTTP requests","version":"1.3.1","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"devDependencies":{"mocha":"^2.1.0","request":"2.20.x","should":"^5.0.1","should-http":"0.0.2"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"dependencies":{"deep-equal":"0.2.1"},"gitHead":"037022c88fb22a957cb59b483f96a3bd5555d7b8","bugs":{"url":"https://github.com/mmalecki/hock/issues"},"homepage":"https://github.com/mmalecki/hock","_id":"hock@1.3.1","_shasum":"d99be872762903794561ed3e7552220a3f80cfd6","_from":".","_npmVersion":"1.4.29","_npmUser":{"name":"kperkins","email":"ken.perkins@rackspace.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"dist":{"shasum":"d99be872762903794561ed3e7552220a3f80cfd6","size":9666,"noattachment":false,"key":"/hock/-/hock-1.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-1.3.1.tgz"},"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/hock-1.3.1.tgz_1458336759649_0.5861263799015433"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:47.178Z","publish_time":1458336760043,"_cnpm_publish_time":1458336760043},"1.3.0":{"name":"hock","description":"A mocking server for HTTP requests","version":"1.3.0","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"devDependencies":{"mocha":"^2.1.0","request":"2.20.x","should":"^5.0.1","should-http":"0.0.2"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"dependencies":{"deep-equal":"0.2.1"},"gitHead":"67c13f6bb2bda3f2d1943b5e4bb4d40971c4a394","bugs":{"url":"https://github.com/mmalecki/hock/issues"},"homepage":"https://github.com/mmalecki/hock","_id":"hock@1.3.0","_shasum":"d785fbc5ff852110b2b07d6a59d6ca3adb2db5e3","_from":".","_npmVersion":"1.4.29","_npmUser":{"name":"kperkins","email":"ken.perkins@rackspace.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"dist":{"shasum":"d785fbc5ff852110b2b07d6a59d6ca3adb2db5e3","size":9540,"noattachment":false,"key":"/hock/-/hock-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-1.3.0.tgz"},"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/hock-1.3.0.tgz_1458319638039_0.019896517973393202"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:46.316Z","publish_time":1458319638444,"_cnpm_publish_time":1458319638444},"1.2.0":{"name":"hock","description":"A mocking server for HTTP requests","version":"1.2.0","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"devDependencies":{"request":"2.20.x","should":"1.2.x","mocha":"1.9.x"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"dependencies":{"deep-equal":"0.2.1"},"gitHead":"c925b896b4616df586f9df9e5095dba1f21d8568","bugs":{"url":"https://github.com/mmalecki/hock/issues"},"homepage":"https://github.com/mmalecki/hock","_id":"hock@1.2.0","_shasum":"e868222a75f3c97e7a617d54d7f5980746dc9877","_from":".","_npmVersion":"2.1.8","_nodeVersion":"0.10.33","_npmUser":{"name":"kperkins","email":"ken.perkins@rackspace.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"dist":{"shasum":"e868222a75f3c97e7a617d54d7f5980746dc9877","size":8709,"noattachment":false,"key":"/hock/-/hock-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-1.2.0.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:45.451Z","publish_time":1422028158310,"_cnpm_publish_time":1422028158310},"1.1.0":{"name":"hock","description":"A mocking server for HTTP requests","version":"1.1.0","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"devDependencies":{"request":"2.20.x","should":"1.2.x","mocha":"1.9.x"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"dependencies":{"deep-equal":"0.2.1"},"gitHead":"b3f7770aad54929466fcd216097066a9542b144a","bugs":{"url":"https://github.com/mmalecki/hock/issues"},"homepage":"https://github.com/mmalecki/hock","_id":"hock@1.1.0","_shasum":"a74e348342faca87816321c9a46b29b9dff3972a","_from":".","_npmVersion":"2.1.8","_nodeVersion":"0.10.33","_npmUser":{"name":"kperkins","email":"ken.perkins@rackspace.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"dist":{"shasum":"a74e348342faca87816321c9a46b29b9dff3972a","size":8646,"noattachment":false,"key":"/hock/-/hock-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-1.1.0.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:44.581Z","publish_time":1419695543912,"_cnpm_publish_time":1419695543912},"1.0.0":{"name":"hock","description":"A mocking server for HTTP requests","version":"1.0.0","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"devDependencies":{"request":"2.20.x","should":"1.2.x","mocha":"1.9.x"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"dependencies":{"deep-equal":"0.2.1"},"bugs":{"url":"https://github.com/mmalecki/hock/issues"},"homepage":"https://github.com/mmalecki/hock","_id":"hock@1.0.0","dist":{"shasum":"14ee6d164a3c4c1fb040bb270d09059d4af5f26e","size":9805,"noattachment":false,"key":"/hock/-/hock-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"kperkins","email":"ken.perkins@rackspace.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:43.692Z","publish_time":1410187980229,"_cnpm_publish_time":1410187980229},"0.2.5":{"name":"hock","description":"A mocking server for HTTP requests","version":"0.2.5","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"devDependencies":{"request":"2.20.x","should":"1.2.x","mocha":"1.9.x"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"dependencies":{"deep-equal":"0.2.1"},"bugs":{"url":"https://github.com/mmalecki/hock/issues"},"homepage":"https://github.com/mmalecki/hock","_id":"hock@0.2.5","dist":{"shasum":"164fb050544c46a336ed19916f2f06300858d3ff","size":8901,"noattachment":false,"key":"/hock/-/hock-0.2.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-0.2.5.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mmalecki","email":"me@mmalecki.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:42.834Z","publish_time":1394733066208,"_cnpm_publish_time":1394733066208},"0.2.4":{"name":"hock","description":"A mocking server for HTTP requests","version":"0.2.4","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"dependencies":{"underscore":"1.4.x"},"devDependencies":{"request":"2.20.x","should":"1.2.x","mocha":"1.9.x"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"bugs":{"url":"https://github.com/mmalecki/hock/issues"},"_id":"hock@0.2.4","dist":{"shasum":"769cc5d050e8555829997eeb8cadbaed4dea8ea8","size":9586,"noattachment":false,"key":"/hock/-/hock-0.2.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-0.2.4.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"kperkins","email":"ken.perkins@rackspace.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:41.750Z","publish_time":1389662092311,"_cnpm_publish_time":1389662092311},"0.2.3":{"name":"hock","description":"A mocking server for HTTP requests","version":"0.2.3","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"dependencies":{"underscore":"1.4.x"},"devDependencies":{"request":"2.20.x","should":"1.2.x","mocha":"1.9.x"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"bugs":{"url":"https://github.com/mmalecki/hock/issues"},"_id":"hock@0.2.3","dist":{"shasum":"cf59f37bf8fc63c20e72805e364f1aac8fb34810","size":8924,"noattachment":false,"key":"/hock/-/hock-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-0.2.3.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"kperkins","email":"ken.perkins@rackspace.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:40.868Z","publish_time":1389638006336,"_cnpm_publish_time":1389638006336},"0.2.2":{"name":"hock","description":"A mocking server for HTTP requests","version":"0.2.2","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"dependencies":{"underscore":"1.4.x"},"devDependencies":{"request":"2.20.x","should":"1.2.x","mocha":"1.9.x"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"bugs":{"url":"https://github.com/mmalecki/hock/issues"},"_id":"hock@0.2.2","dist":{"shasum":"79a46f6f8a7d1586667a9f278393c551ab199370","size":6321,"noattachment":false,"key":"/hock/-/hock-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-0.2.2.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"kperkins","email":"ken.perkins@rackspace.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:40.007Z","publish_time":1389068284297,"_cnpm_publish_time":1389068284297},"0.2.1":{"name":"hock","description":"A mocking server for HTTP requests","version":"0.2.1","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"dependencies":{"underscore":"1.4.x"},"devDependencies":{"request":"2.20.x","should":"1.2.x","mocha":"1.9.x"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"bugs":{"url":"https://github.com/mmalecki/hock/issues"},"_id":"hock@0.2.1","dist":{"shasum":"94caf4e64ba6fc8a2ad65f26dafa7379ec3d0e9a","size":6041,"noattachment":false,"key":"/hock/-/hock-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"kperkins","email":"ken.perkins@rackspace.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:39.115Z","publish_time":1386689787882,"_cnpm_publish_time":1386689787882},"0.2.0":{"name":"hock","description":"A mocking server for HTTP requests","version":"0.2.0","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"dependencies":{"underscore":"1.4.x"},"devDependencies":{"request":"2.20.x","should":"1.2.x","mocha":"1.9.x"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":">=0.8.x"},"bugs":{"url":"https://github.com/mmalecki/hock/issues"},"_id":"hock@0.2.0","dist":{"shasum":"6e800ee921402c40b7dc3f2c0a959e306040f8e7","size":4859,"noattachment":false,"key":"/hock/-/hock-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-0.2.0.tgz"},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"mmalecki","email":"me@mmalecki.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:38.255Z","publish_time":1371127690897,"_cnpm_publish_time":1371127690897},"0.1.2":{"name":"hock","description":"A mocking server for HTTP requests","version":"0.1.2","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"dependencies":{"underscore":"1.4.x"},"devDependencies":{"assert-called":"0.1.x","request":"2.20.x","async":"0.2.x"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":"0.8.x"},"_id":"hock@0.1.2","dist":{"shasum":"e89b36e37b9a6c39a62f7b9d10eecc585a725d64","size":12664,"noattachment":false,"key":"/hock/-/hock-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-0.1.2.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"kperkins","email":"ken.perkins@rackspace.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:37.369Z","publish_time":1367537864809,"_cnpm_publish_time":1367537864809},"0.1.1":{"name":"hock","description":"A mocking server for HTTP requests","version":"0.1.1","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"dependencies":{"underscore":"1.4.x"},"devDependencies":{"assert-called":"0.1.x","request":"2.20.x","async":"0.2.x"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":"0.8.x"},"_id":"hock@0.1.1","dist":{"shasum":"3fe63b47a40e04bc18383ddeee1f35c3f906f22e","size":12609,"noattachment":false,"key":"/hock/-/hock-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-0.1.1.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"kperkins","email":"ken.perkins@rackspace.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:36.486Z","publish_time":1367537231998,"_cnpm_publish_time":1367537231998},"0.1.0":{"name":"hock","description":"A mocking server for HTTP requests","version":"0.1.0","author":{"name":"Maciej Małecki","email":"me@mmalecki.com"},"contributors":[{"name":"Ken Perkins","email":"ken.perkins@rackspace.com"}],"repository":{"type":"git","url":"http://github.com/mmalecki/hock.git"},"keywords":["mock","http","test"],"dependencies":{"underscore":"1.4.x"},"devDependencies":{"assert-called":"0.1.x","request":"2.20.x","async":"0.2.x"},"main":"./lib/hock","scripts":{"test":"make test"},"engines":{"node":"0.8.x"},"_id":"hock@0.1.0","dist":{"shasum":"9b999611fcadef1322cea69194b006dff7740874","size":4155,"noattachment":false,"key":"/hock/-/hock-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hock/download/hock-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"mmalecki","email":"me@mmalecki.com"},"maintainers":[{"name":"kperkins","email":"ken.perkins@rackspace.com"},{"name":"mmalecki","email":""}],"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:23:35.637Z","publish_time":1367366502627,"_cnpm_publish_time":1367366502627}},"readme":"# hock [![Build Status](https://secure.travis-ci.org/mmalecki/hock.png?branch=master)](http://travis-ci.org/mmalecki/hock) [![Join the chat at https://gitter.im/mmalecki/hock](https://badges.gitter.im/mmalecki/hock.svg)](https://gitter.im/mmalecki/hock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nAn HTTP mocking server based on [Nock](https://github.com/flatiron/nock).\n\n## Overview\n\nHock is an HTTP mocking server with an API designed to closely match that of Nock. The key difference between Nock and Hock is that nock works by overriding `http.clientRequest`, allowing requests to be intercepted before they go over the wire.\n\nHock is designed as a fully functioning HTTP service. You enqueue requests and responses in a similar fashion to Nock:\n\n```Javascript\n\n    var http = require('http'),\n        hock = require('hock'),\n        request = require('request');\n\n    var mock = hock.createHock();\n    mock\n        .get('/some/url')\n        .reply(200, 'Hello!');\n\n    var server = http.createServer(mock.handler);\n    server.listen(1337, function () {\n        request('http://localhost:' + 1337 + '/some/url', function(err, res, body) {\n           console.log(body);\n        });\n    });\n\n```\n\n## HTTP Methods\n\nHock supports the 5 primary HTTP methods at this time:\n\n* GET\n* POST\n* PUT\n* PATCH\n* DELETE\n* HEAD\n* COPY\n* OPTIONS\n\n```Javascript\n    // Returns a hock Request object\n    var req = hockServer.get(url, requestHeaders);\n```\n\n```Javascript\n    // Returns a hock Request object\n    var req = hockServer.delete(url, requestHeaders);\n```\n\n```Javascript\n    // Returns a hock Request object\n    var req = hockServer.post(url, body, requestHeaders);\n```\n\n```Javascript\n    // Returns a hock Request object\n    var req = hockServer.put(url, body, requestHeaders);\n```\n\n```Javascript\n    // Returns a hock Request object\n    var req = hockServer.head(url, requestHeaders);\n```\n\n## Request Object\n\nAll of these methods return an instance of a `Request`, a hock object which contains all of the state for a mocked request. To define the response and enqueue into the `hockServer`, call either `reply` or `replyWithFile` on the `Request` object:\n\n```Javascript\n    // returns the current hockServer instance\n    req.reply(statusCode, body, responseHeaders);\n```\n\n```Javascript\n    // returns the current hockServer instance\n    req.replyWithFile(statusCode, filePath, responseHeaders);\n```\n\nYou can optionally send a ReadableStream with reply, for example testing with large responses without having to use a file on disk:\n\n```Javascript\n    // returns the current hockServer instance\n    req.reply(statusCode, new RandomStream(10000), responseHeaders);\n```\n\nYou can also provide functions instead of concrete values. These functions will be called with the matching incoming http request, and it useful in cases where the response body or headers need to be constructed based on the incoming request data:\n\n```Javascript\n    // returns the current hockServer instance\n    req.reply(\n        statusCode,\n        function replyWithBody(request) {\n            return body;\n        },\n        function replyWithHeaders(request) {\n            return responseHeaders;\n        }\n    );\n```\n\n## Multiple matching requests\n\nYou can optionally tell hock to match multiple requests for the same route:\n\n```Javascript\n    hockServer.put('/path/one', {\n        foo: 1,\n        bar: {\n            baz: true\n            biz: 'asdf1234'\n        }\n    })\n    .min(4)\n    .max(10)\n    .reply(202, {\n        status: 'OK'\n    })\n```\n\nCall `many` if you need to handle at least one, possibly\nmany requests:\n\n```Javascript\n    hockServer.put('/path/one', {\n        foo: 1,\n        bar: {\n            baz: true\n            biz: 'asdf1234'\n        }\n    })\n    .many() // min 1, max Unlimited\n    .reply(202, {\n        status: 'OK'\n    })\n```\n\nProvide custom min and max options to `many`:\n\n```Javascript\n    hockServer.put('/path/one', {\n        foo: 1,\n        bar: {\n            baz: true\n            biz: 'asdf1234'\n        }\n    })\n    .many({\n        min: 4,\n        max: 10\n    })\n    .reply(202, {\n        status: 'OK'\n    })\n```\n\nSet infinite number of requests with `max(Infinity)`:\n\n```Javascript\n    hockServer.put('/path/one', {\n        foo: 1,\n        bar: {\n            baz: true\n            biz: 'asdf1234'\n        }\n    })\n    .max(Infinity)\n    .reply(202, {\n        status: 'OK'\n    })\n```\n\nIf you don't care how many or how few requests are served, you can use `any`:\n\n```Javascript\n    hockServer.put('/path/one', {\n        foo: 1,\n        bar: {\n            baz: true\n            biz: 'asdf1234'\n        }\n    })\n    .any() // equivalent to min(0), max(Infinity)\n    .reply(202, {\n        status: 'OK'\n    })\n```\n### hockServer.done() with many\n\n`hockServer.done()` will verify the number of requests fits within the\nminimum and maximum constraints specified by `min`, `max`, `many` or `any`:\n\n```js\nhockServer.get('/').min(2)\nrequest.get('/', function() {\n  hockServer.done(function(err) {\n    console.error(err) // error, only made one request\n  })\n})\n```\n\nIf the number of requests doesn't verify and you don't supply a callback\nto `hockServer.done()` it will throw!\n\n## Chaining requests\n\nAs the `reply` and `replyWithFile` methods return the current hockServer, you can chain them together:\n\n```Javascript\n\n    hockServer.put('/path/one', {\n        foo: 1,\n        bar: {\n            baz: true\n            biz: 'asdf1234'\n        }\n    })\n    .reply(202, {\n        status: 'OK'\n    })\n    .get('/my/file/should/be/here')\n    .replyWithFile(200, __dirname + '/foo.jpg');\n\n```\n\n## Matching requests\n\nWhen a request comes in, hock iterates through the queue in a First-in-first-out approach, so long as the request matches. The criteria for matching is based on the method and the url, and additionally the request body if the request is a `PUT`, `PATCH`, or `POST`. If you specify request headers, they will also be matched against before sending the response.\n\n## Path filtering\n\nYou can filter paths using regex or a custom function, this is useful for things like timestamps that get appended to urls from clients.\n\n```Javascript\n\n    hockServer\n        .filteringPathRegEx(/timestamp=[^&]*/g, 'timestamp=123')\n        .get('/url?timestamp=123')\n        .reply(200, 'Hi!');\n\n```\n\n```Javascript\n\n    hockServer\n        .filteringPath(function (p) {\n            return '/url?timestamp=XXX';\n        })\n        .get('/url?timestamp=XXX')\n        .reply(200, 'Hi!');\n\n```\n","_attachments":{},"homepage":"https://github.com/mmalecki/hock#readme","bugs":{"url":"https://github.com/mmalecki/hock/issues"},"license":"MIT"}