How to use @pollyjs/adapter - 3 common examples

To help you get started, we’ve selected a few @pollyjs/adapter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / pollyjs__adapter / pollyjs__adapter-tests.ts View on Github external
import Adapter from '@pollyjs/adapter';
import { Request } from '@pollyjs/core';

Adapter.name;
Adapter.type;

const adapter = new Adapter();

async function doReq(req: Request) {
  const result = await adapter.passthroughRequest(req);
  result.statusCode;
  result.headers;
  result.body;
}
github DefinitelyTyped / DefinitelyTyped / types / pollyjs__adapter / pollyjs__adapter-tests.ts View on Github external
import Adapter from '@pollyjs/adapter';
import { Request } from '@pollyjs/core';

Adapter.name;
Adapter.type;

const adapter = new Adapter();

async function doReq(req: Request) {
  const result = await adapter.passthroughRequest(req);
  result.statusCode;
  result.headers;
  result.body;
}
github DefinitelyTyped / DefinitelyTyped / types / pollyjs__adapter / pollyjs__adapter-tests.ts View on Github external
import Adapter from '@pollyjs/adapter';
import { Request } from '@pollyjs/core';

Adapter.name;
Adapter.type;

const adapter = new Adapter();

async function doReq(req: Request) {
  const result = await adapter.passthroughRequest(req);
  result.statusCode;
  result.headers;
  result.body;
}

@pollyjs/adapter

Extendable base adapter class used by @pollyjs

Apache-2.0
Latest version published 10 months ago

Package Health Score

67 / 100
Full package analysis