{"_id":"opbeat-http-client","_rev":"1029063","name":"opbeat-http-client","description":"An HTTP client for communicating with the Opbeat intake API","dist-tags":{"latest":"1.2.2"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"time":{"modified":"2024-09-10T16:37:34.000Z","created":"2015-03-13T19:57:04.301Z","1.2.2":"2017-01-16T15:45:50.087Z","1.2.1":"2017-01-16T15:40:54.494Z","1.2.0":"2016-08-25T16:50:52.513Z","1.1.0":"2016-08-24T12:13:03.198Z","1.0.3":"2015-04-24T13:03:12.311Z","1.0.2":"2015-03-14T13:04:02.021Z","1.0.1":"2015-03-14T11:51:45.328Z","1.0.0":"2015-03-13T19:57:04.301Z"},"users":{},"author":{"name":"Thomas Watson Steen","email":"w@tson.dk","url":"https://twitter.com/wa7son"},"repository":{"type":"git","url":"git+https://github.com/watson/opbeat-http-client.git"},"versions":{"1.2.2":{"name":"opbeat-http-client","version":"1.2.2","description":"An HTTP client for communicating with the Opbeat intake API","main":"index.js","directories":{"test":"test"},"scripts":{"test":"standard && tape test.js"},"author":{"name":"Thomas Watson Steen","email":"w@tson.dk","url":"https://twitter.com/wa7son"},"license":"MIT","dependencies":{"fast-safe-stringify":"^1.1.3"},"devDependencies":{"nock":"^9.0.2","standard":"^8.6.0","tape":"^4.6.3"},"repository":{"type":"git","url":"git+https://github.com/watson/opbeat-http-client.git"},"bugs":{"url":"https://github.com/watson/opbeat-http-client/issues"},"homepage":"https://github.com/watson/opbeat-http-client","keywords":["opbeat","http","client"],"coordinates":[55.6809164,12.5641261],"gitHead":"2198a259214e4b0521bd58a8e86b874f41ee5204","_id":"opbeat-http-client@1.2.2","_shasum":"8ad399969d508254dace2d0853981368117da33f","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"watson","email":"w@tson.dk"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"dist":{"shasum":"8ad399969d508254dace2d0853981368117da33f","tarball":"http://registry-npm.ywwl.com/opbeat-http-client/download/opbeat-http-client-1.2.2.tgz","integrity":"sha512-Q+4tHeZYOb0+tKJIv08lAUhyRII/TGFLDy4HazaLi6azYdhdr3F6jC4RAVymiJj/aLhXnbK2t+htdz80ar7YmA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpUcZHpaIhRkVln4Bh3uUkFe5Fq0DHgTGlO0DeI4/RXwIhAPc2S4ZkRlO7vdB64rTjPQHgkvf8aKUqhGC3wLhOj6gb"}],"size":4027,"noattachment":false,"key":"/opbeat-http-client/-/opbeat-http-client-1.2.2.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/opbeat-http-client-1.2.2.tgz_1484581548088_0.08338243165053427"},"publish_time":1484581550087,"_cnpm_publish_time":1484581550087},"1.2.1":{"name":"opbeat-http-client","version":"1.2.1","description":"An HTTP client for communicating with the Opbeat intake API","main":"index.js","directories":{"test":"test"},"scripts":{"test":"standard && tape test.js"},"author":{"name":"Thomas Watson Steen","email":"w@tson.dk"},"license":"MIT","dependencies":{"fast-safe-stringify":"^1.1.3"},"devDependencies":{"nock":"^1.1.0","standard":"^2.11.0","tape":"^3.5.0"},"repository":{"type":"git","url":"git+https://github.com/watson/opbeat-http-client.git"},"bugs":{"url":"https://github.com/watson/opbeat-http-client/issues"},"homepage":"https://github.com/watson/opbeat-http-client","keywords":["opbeat","http","client"],"coordinates":[55.6809764,12.5642227],"gitHead":"935823da32523f753bd4d2ffd29941b6b5b073d3","_id":"opbeat-http-client@1.2.1","_shasum":"7166b675de24b260777a4f9e8f96d77d38471e6c","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"watson","email":"w@tson.dk"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"dist":{"shasum":"7166b675de24b260777a4f9e8f96d77d38471e6c","tarball":"http://registry-npm.ywwl.com/opbeat-http-client/download/opbeat-http-client-1.2.1.tgz","integrity":"sha512-cSsdqdCP6HT6nWT3JWmodOGuO5rvYEerP2qDNPc2QowK4XrtbzPioEh4xz5+KQMH/DqtmGEWc9dXX8u4GyAadg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCj4oQLj4z8+f/4JM2fDwYBKXeN8+jqiWewece1bM4olAIgDST7L0dj89/LexqWiEbqeDFG/IgKUyJ4z2M3Wn5orY8="}],"size":4002,"noattachment":false,"key":"/opbeat-http-client/-/opbeat-http-client-1.2.1.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/opbeat-http-client-1.2.1.tgz_1484581253832_0.03629314503632486"},"publish_time":1484581254494,"_cnpm_publish_time":1484581254494},"1.2.0":{"name":"opbeat-http-client","version":"1.2.0","description":"An HTTP client for communicating with the Opbeat intake API","main":"index.js","directories":{"test":"test"},"scripts":{"test":"standard && tape test.js"},"author":{"name":"Thomas Watson Steen","email":"w@tson.dk"},"license":"MIT","dependencies":{"json-stringify-safe":"^5.0.0"},"devDependencies":{"nock":"^1.1.0","standard":"^2.11.0","tape":"^3.5.0"},"repository":{"type":"git","url":"git+https://github.com/watson/opbeat-http-client.git"},"bugs":{"url":"https://github.com/watson/opbeat-http-client/issues"},"homepage":"https://github.com/watson/opbeat-http-client","keywords":["opbeat","http","client"],"coordinates":[64.15020059999999,-21.9329849],"gitHead":"8ac0014ca3e52fda5959d4a4bebd5a9b774e05ee","_id":"opbeat-http-client@1.2.0","_shasum":"f63d93ecdc6da43189317ad083245be04851ccbe","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"watson","email":"w@tson.dk"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"dist":{"shasum":"f63d93ecdc6da43189317ad083245be04851ccbe","tarball":"http://registry-npm.ywwl.com/opbeat-http-client/download/opbeat-http-client-1.2.0.tgz","integrity":"sha512-D5+sDifIiEQhnnUih7hv/SQXn8TOg9IT43oSWS0k7atAs5oXGmKgjWWRRbRDyhhLyX6dortttjZ2wgweZI/Uvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAOFmol0k/RYWX3h8zBOOPyy5ECeNzDudE9ub4ioehyQIgcgeNSjZcp306+AQ1rb4me1UUmPV5QoJKR90c/ITu5T4="}],"size":4025,"noattachment":false,"key":"/opbeat-http-client/-/opbeat-http-client-1.2.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/opbeat-http-client-1.2.0.tgz_1472143850494_0.34820276824757457"},"publish_time":1472143852513,"_cnpm_publish_time":1472143852513},"1.1.0":{"name":"opbeat-http-client","version":"1.1.0","description":"An HTTP client for communicating with the Opbeat intake API","main":"index.js","directories":{"test":"test"},"scripts":{"test":"standard && tape test.js"},"author":{"name":"Thomas Watson Steen","email":"w@tson.dk"},"license":"MIT","dependencies":{"json-stringify-safe":"^5.0.0"},"devDependencies":{"nock":"^1.1.0","standard":"^2.11.0","tape":"^3.5.0"},"repository":{"type":"git","url":"git+https://github.com/watson/opbeat-http-client.git"},"bugs":{"url":"https://github.com/watson/opbeat-http-client/issues"},"homepage":"https://github.com/watson/opbeat-http-client","keywords":["opbeat","http","client"],"coordinates":[64.1488669,-21.9420381],"gitHead":"7b444cc2798a7b9cd0fe27c453cfdb1cc9de51da","_id":"opbeat-http-client@1.1.0","_shasum":"3d3be01290e575f1eee29398986a967996413916","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"watson","email":"w@tson.dk"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"dist":{"shasum":"3d3be01290e575f1eee29398986a967996413916","tarball":"http://registry-npm.ywwl.com/opbeat-http-client/download/opbeat-http-client-1.1.0.tgz","integrity":"sha512-YT/L2ugZ6gTO03L7wxkwd1SH0ChiYCf0Ns0zZrO3Z/qEjFyhtlWZvSsaLMwg5UkmT58+XxIJsYXpHQhnQ3lo9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFo7ITek2Tytac8eLDXNdyXhYZaNZ/2Df0GSAM/eXs1BAiEAiMjCe4CpY3tqW0zJ7fP+/EVCr7T39IcE/7gpSBwckyU="}],"size":3819,"noattachment":false,"key":"/opbeat-http-client/-/opbeat-http-client-1.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/opbeat-http-client-1.1.0.tgz_1472040781513_0.526276727207005"},"publish_time":1472040783198,"_cnpm_publish_time":1472040783198},"1.0.3":{"name":"opbeat-http-client","version":"1.0.3","description":"An HTTP client for communicating with the Opbeat intake API","main":"index.js","directories":{"test":"test"},"scripts":{"test":"standard && tape test.js"},"author":{"name":"Thomas Watson Steen","email":"w@tson.dk"},"license":"MIT","dependencies":{"json-stringify-safe":"^5.0.0"},"devDependencies":{"nock":"^1.1.0","standard":"^2.11.0","tape":"^3.5.0"},"repository":{"type":"git","url":"https://github.com/watson/opbeat-http-client.git"},"bugs":{"url":"https://github.com/watson/opbeat-http-client/issues"},"homepage":"https://github.com/watson/opbeat-http-client","keywords":["opbeat","http","client"],"gitHead":"6e17da786cde005c7e775ad6bac109bceeff9dda","_id":"opbeat-http-client@1.0.3","_shasum":"1874f0788cd08a4afc1e8e509f5bc297536a92e8","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"watson","email":"w@tson.dk"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"dist":{"shasum":"1874f0788cd08a4afc1e8e509f5bc297536a92e8","tarball":"http://registry-npm.ywwl.com/opbeat-http-client/download/opbeat-http-client-1.0.3.tgz","integrity":"sha512-qbgYCkLriIgths8RdyM/dxnaYAdlJrfns2iFniTxCEbT/yfgWeFnAuzcQzdQ2GeXCPqHzVO/SczLss+67QZ7Sg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyFWzOMSJs19cRgyBTSIFpf4vlff0zG3z40xo+RVhMHwIhAL4JRXWMVVuiNkj4fztUa7uNKg/zngzmwt89fGxsStis"}],"size":3662,"noattachment":false,"key":"/opbeat-http-client/-/opbeat-http-client-1.0.3.tgz"},"publish_time":1429880592311,"_cnpm_publish_time":1429880592311},"1.0.2":{"name":"opbeat-http-client","version":"1.0.2","description":"An HTTP client for communicating with the Opbeat intake API","main":"index.js","directories":{"test":"test"},"scripts":{"test":"standard && tape test.js"},"author":{"name":"Thomas Watson Steen","email":"w@tson.dk"},"license":"MIT","dependencies":{"json-stringify-safe":"^5.0.0"},"devDependencies":{"nock":"^1.1.0","standard":"^2.11.0","tape":"^3.5.0"},"gitHead":"5b75fa960543046874f4d82a242a0864efaccd7b","_id":"opbeat-http-client@1.0.2","_shasum":"c020ac541977b7d6d20340f9127f6c97b896cb92","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"watson","email":"w@tson.dk"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"dist":{"shasum":"c020ac541977b7d6d20340f9127f6c97b896cb92","tarball":"http://registry-npm.ywwl.com/opbeat-http-client/download/opbeat-http-client-1.0.2.tgz","integrity":"sha512-Q5xiEGwhrFSUMSK2VGQ5H853Rm+nkUec0rt29IBLGG8AjFU5BD1Eh2wMF6lGa8gC62OOpstmiGUeGuNcSSTriw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2hfiWzVYfdUtIDUeDekCwlwe6q4q8hBRLEci8gkCF1wIgI7K5bZfZeso4XAAe7BWQ8gX7mxboRn8GmVhFPJc74J4="}],"size":3571,"noattachment":false,"key":"/opbeat-http-client/-/opbeat-http-client-1.0.2.tgz"},"publish_time":1426338242021,"_cnpm_publish_time":1426338242021},"1.0.1":{"name":"opbeat-http-client","version":"1.0.1","description":"An HTTP client for communicating with the Opbeat intake API","main":"index.js","directories":{"test":"test"},"scripts":{"test":"standard && tape test.js"},"author":{"name":"Thomas Watson Steen","email":"w@tson.dk"},"license":"MIT","dependencies":{"json-stringify-safe":"^5.0.0"},"devDependencies":{"nock":"^1.1.0","standard":"^2.11.0","tape":"^3.5.0"},"gitHead":"f1aba14d0618c6bfb6c3f7a0febf0cc9d71ca942","_id":"opbeat-http-client@1.0.1","_shasum":"302dfe8279eb9a403edbff941a9bf7c2c83b2199","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"watson","email":"w@tson.dk"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"dist":{"shasum":"302dfe8279eb9a403edbff941a9bf7c2c83b2199","tarball":"http://registry-npm.ywwl.com/opbeat-http-client/download/opbeat-http-client-1.0.1.tgz","integrity":"sha512-bmn+J5szXNdgqUwX2WpCIAXt14ObLN6WjwlhTY7637rEH50Z+UJle72QzG1DRu6ml6HjyrDTuWqBJAwihKuh5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD950yG0FjQIifwnFdL6phCbECbD0RnKjwgxYXTZWNt2QIhANHXqmaDyzeuny6EMj4O4y8Ab3EXtKaaMulxysrbCCQz"}],"size":3573,"noattachment":false,"key":"/opbeat-http-client/-/opbeat-http-client-1.0.1.tgz"},"publish_time":1426333905328,"_cnpm_publish_time":1426333905328},"1.0.0":{"name":"opbeat-http-client","version":"1.0.0","description":"An HTTP client for communicating with the Opbeat intake API","main":"index.js","directories":{"test":"test"},"scripts":{"test":"standard && tape test.js"},"author":{"name":"Thomas Watson Steen","email":"w@tson.dk"},"license":"MIT","dependencies":{"json-stringify-safe":"^5.0.0"},"devDependencies":{"nock":"^1.1.0","standard":"^2.11.0","tape":"^3.5.0"},"gitHead":"eb5248a536fc5ae94e008933f5363c3f8ae6a1f1","_id":"opbeat-http-client@1.0.0","_shasum":"9fd499c208003528e39ce20a923496604d2b1252","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"watson","email":"w@tson.dk"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"dist":{"shasum":"9fd499c208003528e39ce20a923496604d2b1252","tarball":"http://registry-npm.ywwl.com/opbeat-http-client/download/opbeat-http-client-1.0.0.tgz","integrity":"sha512-qpJ1NiG55GQ8DMzphi3q0IUbGtKAC4X6nuzKIyZctag99TITbDAPjDZ1IjQptdJ2+JNk0PJfBln3j5Dck92sig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6/Y/N99UXy/LIgPUQtvwlNGkwkxN3nJceGlYBW/LrEwIge/ZYOYsYIE8hnDDv/XNyBlOSuZfZGdhyon8pt+q847Q="}],"size":2925,"noattachment":false,"key":"/opbeat-http-client/-/opbeat-http-client-1.0.0.tgz"},"publish_time":1426276624301,"_cnpm_publish_time":1426276624301}},"readme":"# opbeat-http-client\n\n[![Build status](https://travis-ci.org/watson/opbeat-http-client.svg?branch=master)](https://travis-ci.org/watson/opbeat-http-client)\n\n[![js-standard-style](https://raw.githubusercontent.com/feross/standard/master/badge.png)](https://github.com/feross/standard)\n\nA low-level HTTP client for communicating with the Opbeat intake API.\n\nThis module is meant for building other modules that needs to\ncommunicate with Opbeat.\n\nIf you are looking to use Opbeat in your app or website, you'd most\nlikely want to check out [the official Opbeat module for\nNode.js](https://github.com/opbeat/opbeat-node) instead.\n\n## Installation\n\n```\nnpm install opbeat-http-client\n```\n\n## Example Usage\n\n```js\nvar opbeatHttpClient = require('opbeat-http-client')({\n  appId: '...',\n  organizationId: '...',\n  secretToken: '...',\n  userAgent: '...'\n})\n\nopbeatHttpClient.request('errors', body, function (err, res, body) {\n  if (err) throw err\n  console.log(body)\n})\n```\n\n## API\n\nThe module exposes an initialize function which takes a single options\nhash as the 1st argument. All properties are required:\n\n- `appId` - The Opbeat app id\n- `organizationId` - The Opbeat organization id\n- `secretToken` - The Opbeat secret token\n- `userAgent` - The HTTP user agent that your module should identify it\n  self with\n\nThe init function will return a low level HTTP client primed for\ncommunicating with the Opbeat intake API.\n\n### `client.request(endpoint, [headers], body, callback)`\n\n#### endpoint\n\nThe Opbeat intake API v1 currently support the following two endpoints:\n\n- `errors`\n- `releases`\n\nThe full URL's for those are:\n\n```\nhttps://intake.opbeat.com/api/v1/organizations/<organization-id>/apps/<app-id>/<endpoint>/\n```\n\nWhen specifying the `endpoint` argument in the `client.request()`\nmethod, you just have to specify that last part of the URL, e.g.\n\"releases\".\n\n#### headers\n\nAn optional object that you can use to supply custom headers that should\nbe sent to the Opbeat intake API.\n\n#### body\n\nThe body should be in the form of a JavaScript object literal. The\nopbeat-http-client will take care of encoding it correctly.\n\n#### callback\n\nThe callback function is called with 3 arguments:\n\n1. An error when applicable (usually from the [http.ClientRequest](https://nodejs.org/api/http.html#http_class_http_clientrequest) object)\n1. An [http.IncomingMessage](https://nodejs.org/api/http.html#http_http_incomingmessage) object\n1. The response body (as a String)\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/watson/opbeat-http-client","bugs":{"url":"https://github.com/watson/opbeat-http-client/issues"},"license":"MIT"}