import NodeRequestAdapter from '@pageproof/sdk/src/adapters/NodeRequestAdapter.js'
NodeRequestAdapter
Extends:
IRequestAdapter → NodeRequestAdapter
The Node.js request adapter (Node.js only).
This IRequestAdapter uses an npm package called superagent
(https://npmjs.org/package/superagent) to send
requests to the PageProof API in a Node.js environment. It's recommended this adapter be used in cases like Electron
(https://electron.atom.io) because it is not limited to the network constraints of browser renderers.
Note: This adapter does not yet support progress events.
Example:
import PageProof from '@pageproof/sdk';
import NodeRequestAdapter from '@pageproof/sdk/lib/adapters/NodeRequestAdapter';
const client = new PageProof({
adapters: [
new NodeRequestAdapter({
applicationId: '3uQkbQXsinffvnNHPlplx4Uw1sVeWEab',
endpoint: 'https://managed-api.pageproof.com',
key: '104882dfa7c44330811612ea100dc7e6',
}),
],
});
Constructor Summary
Public Constructor | ||
public |
constructor(options: object) |
Member Summary
Public Members | ||
public |
options: * |
Method Summary
Public Methods | ||
public |
send(request: *, options: {}): * |
Inherited Summary
From class IRequestAdapter | ||
public abstract |
send() |
Public Constructors
Public Members
public options: * source
Public Methods
public send(request: *, options: {}): * source
Override:
IRequestAdapter#sendParams:
Name | Type | Attribute | Description |
request | * | ||
options | {} |
|
Return:
* |