How to use the mappersmith/middleware/retry/v2 function in mappersmith

To help you get started, we’ve selected a few mappersmith 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 kafkajs / confluent-schema-registry / src / api / index.ts View on Github external
export default ({
  auth,
  clientId,
  host,
  retry = {},
}: SchemaRegistryAPIClientArgs): SchemaRegistryAPIClient =>
  forge({
    clientId: clientId || DEFAULT_API_CLIENT_ID,
    ignoreGlobalMiddleware: true,
    host,
    middleware: [
      confluentEncoder,
      RetryMiddleware(Object.assign(DEFAULT_RETRY, retry)),
      errorMiddleware,
      ...(auth ? [BasicAuthMiddleware(auth)] : []),
    ],
    resources: {
      Schema: {
        find: {
          method: 'get',
          path: '/schemas/ids/{id}',
        },
      },
      Subject: {
        all: {
          method: 'get',
          path: '/subjects',
        },
        latestVersion: {

mappersmith

It is a lightweight rest client for node.js and the browser

MIT
Latest version published 3 months ago

Package Health Score

86 / 100
Full package analysis