{"_id":"@advanced-rest-client/electron-http-transport","_rev":"9-45b2bea45a4d312bd13240bf43f7c07e","name":"@advanced-rest-client/electron-http-transport","dist-tags":{"latest":"2.0.0-preview"},"versions":{"2.0.0-preview":{"name":"@advanced-rest-client/electron-http-transport","version":"2.0.0-preview","license":"Apache-2.0","_id":"@advanced-rest-client/electron-http-transport@2.0.0-preview","maintainers":[{"name":"jarrodek","email":"jarrodek@gmail.com"}],"homepage":"https://github.com/advanced-rest-client/electron-http-transport#readme","bugs":{"url":"https://github.com/advanced-rest-client/electron-http-transport/issues","email":"arc@mulesoft.com"},"dist":{"shasum":"113d8a291119ad931a399f32a8adada3a4ae5609","tarball":"https://registry.npmjs.org/@advanced-rest-client/electron-http-transport/-/electron-http-transport-2.0.0-preview.tgz","fileCount":25,"integrity":"sha512-tQIDaaIrkp2Qfz/leFVKE85xHEg7WpbagTI8aCzDlf1CtphWcQm8epwKESeUV5fi/Pvx3RxKTpSfYrXGqz5zFw==","signatures":[{"sig":"MEUCIG1O5yLic8ylRkbOzSuGvCeVPcl80AnllRdfAtf7PcumAiEA/4+by9VLifBktFXnjx9/3AuOklf4QMNMzA/V4/oXN3I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbeKMfCRA9TVsSAnZWagAA730P/0m5FVmrSUPoNYruq6lz\nqVkLVWhrfQIyvpp4Zm1TBw2jFtQeyHRZWakm1RtEpa63LOb6LAQh3rVlSbl8\ng6gL4ZJ8uSraaA5+ZVMrFIpLxl7/gyCF6STn3uicpUBvNwIXtp0YtFhDyyf5\nXcteFCMbssqyaiAlX6LVUrWPIbsUw7ayHYAlCK9FNu63+FnCo0FFWevrS16q\n69YBTbR8E9+d0vsafB8SvDYRisyT7qabdFJY/XpsO0SM/q9KsoIl6mZWdBo0\nirQI2YsbVH4xrQYSGwGmj8eZ7jnDug2UATbY2CPiqykdtVuhVWKFXneOkJHb\nH7l2TT6T9CFn7CC936xfd5MmQPFxqd87Jl9hZRnOGXM8bI4Op3DJYNquS7wU\nNDIBcRIzuYqx/HCM2QxUsYFFqBpluhcAObLeKj5fGstkze+ChiUV36Z+eReI\nXOzkwQrGMLYAYi1EgrjIbZOCVJVDPSD5FyHCHMCnJkJBoRrxV5qw/iglYXoK\n5G9bMfVs/ijPRRsFOiwPB5rmkfDt6Bx9MoTaTpsH1/0M1vApa5bDzyo6J1uC\nwATPLaNMxwagKis3kookMkbgnVqQaQpUALX7xxlRHrm8u1RQ4EBDFoZzs4Yi\nAZI2pkgXJCwoW52WTWiu7e8mdfKwoaLH/dWEZhuyhwuvLdpzwiOS+RTYepKm\n9Seb\r\n=fVP3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"electron-http-transport.html","authors":["Pawel Psztyc","The Advanced REST client authors <arc@mulesoft.com>"],"gitHead":"2f8982c6ea9af485b2eb96bed9a06e692dfa4e2f","private":false,"scripts":{"demo":"electron ./demo/main","test":"electron-mocha --renderer --preload bower_components/webcomponentsjs/webcomponents-loader.js test/*.test.js","test-request":"electron-mocha --renderer --interactive --preload bower_components/webcomponentsjs/webcomponents-loader.js test/request.test.js","update-types":"gen-typescript-declarations --deleteExisting --outDir ."},"_npmUser":{"name":"jarrodek","email":"jarrodek@gmail.com"},"repository":{"url":"git://github.com/advanced-rest-client/electron-http-transport.git","type":"git"},"_npmVersion":"6.4.0","description":"A web component to work with @advanced-rest-client/electron-request node package in web components environment","directories":{},"_nodeVersion":"8.11.2","dependencies":{"electron-log":"^2.2.16","@advanced-rest-client/electron-request":"^1.0.0-rc4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^4.1.0","electron":"^2.0.7","ssl-root-cas":"^1.2.5","electron-mocha":"^6.0.4","@polymer/gen-typescript-declarations":"^1.1.1","@advanced-rest-client/arc-electron-preferences":"^1.0.0-rc1"},"_npmOperationalInternal":{"tmp":"tmp/electron-http-transport_2.0.0-preview_1534632734591_0.09221295935847129","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-08-18T22:52:14.368Z","modified":"2026-04-07T19:30:35.600Z","2.0.0-preview":"2018-08-18T22:52:14.657Z"},"bugs":{"url":"https://github.com/advanced-rest-client/electron-http-transport/issues","email":"arc@mulesoft.com"},"license":"Apache-2.0","homepage":"https://github.com/advanced-rest-client/electron-http-transport#readme","repository":{"url":"git://github.com/advanced-rest-client/electron-http-transport.git","type":"git"},"description":"A web component to work with @advanced-rest-client/electron-request node package in web components environment","maintainers":[{"email":"jarrodek@gmail.com","name":"jarrodek"},{"email":"alexperez@mulesoft.com","name":"alexperez_march_2024"},{"email":"elmellidiego@gmail.com","name":"dmacias"}],"readme":"# electron-http-transport\n\nA web component to work with `@advanced-rest-client/electron-request` node package in web components environment.\n\n## Usage\n\nTo be used in renderer process as a web component.\n\n```html\n<body>\n  <arc-request-logic></arc-request-logic>\n  <electron-http-transport></electron-http-transport>\n</body>\n```\n\n```javascript\n\nconst e = new CustomEvent('api-request', {\n  bubbles: true,\n  composed: true,\n  cancelable: true,\n  detail: {\n    id: 'some id',\n    url: 'https://api.mulesoft.com/',\n    method: 'test'\n  }\n});\nthis.dispatchEvent(e);\n\nwindow.addEventListener('api-response', (e) => {\n  console.log(e.detail);\n});\n```\n\nThe `arc-request-logic` processes the request before sending it to the transport library.\nIt processes variables and before request actions. It also dispatches `before-request`\ncustom event so listeners can modify the request or cancel it.\n\nWhen the request finally gets to the `electron-http-transport` component it is\npassed to `@advanced-rest-client/electron-request` with read request options like\ndefault timeout or hosts list. Finally the component communicate to `arc-request-logic`\ncomponent that the response is ready.\n\n## Events\n\nEach event contains the `id` property on the detail object which is original request id.\n\n-   `request-load-start` - request is being loaded\n-   `request-first-byte-received` - started receiving response\n-   `request-load-end` - all data is now read\n\n**before-redirect**\n\nDispatched before redirect occurs. It contains `id` and `url` properties on the detail\nobject. The `url` is redirect location.\nIf the event is cancelled then the redirection will be cancelled regardless of\n`followRedirects` setting.\n\n**headers-received**\n\nDispatched right after all headers has been read. contains `id` and `value` properties on the detail\nobject. The `value` is headers string.\n\nIf the event is cancelled then the request is aborted.\n\n**response-ready**\n\nPart of the arc request flow. Dispatched before the response is send to the response\nview. Any listener can modify response data during this event.\n\n\n**report-response**\n\nPart of the arc request flow. An event read by `arc-request-logic` component which\nruns response actions and reports the response to the view.\n\n**host-rules-list**\n\nAsks the application for the list of hosts rules.\nIf the event is not cancelled then the value is ignored.\nThe application must set `result` property on the detail object containing promise\nresolved to the list of rules.\n\n**settings-read**\n\nAsks the application for current settings. It contains `settings` property with\nonly item set to `requestDefaultTimeout` so the application can limit settings\nvalue in the response.\n","readmeFilename":"README.md"}