How to use the @algolia/requester-common/src/types/MethodType.MethodEnum.Post function in @algolia/requester-common

To help you get started, we’ve selected a few @algolia/requester-common 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 algolia / algoliasearch-client-javascript / packages / requester-browser-xhr / src / __tests__ / Fixtures.ts View on Github external
public static request(): Request {
    return {
      url: 'https://algolia-dns.net/foo?x-algolia-header=bar',
      method: MethodEnum.Post,
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      },
      data: JSON.stringify({ foo: 'bar' }),
      timeout: 2,
    };
  }
}
github algolia / algoliasearch-client-javascript / packages / requester-node-http / src / __tests__ / Fixtures.ts View on Github external
public static request(): Request {
    return {
      url: 'https://algolia-dns.net/foo?x-algolia-header=foo',
      method: MethodEnum.Post,
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      },
      data: JSON.stringify({ foo: 'bar' }),
      timeout: 2,
    };
  }
}

@algolia/requester-common

Common interfaces for promise-based request libraries

MIT
Latest version published 5 months ago

Package Health Score

78 / 100
Full package analysis

Similar packages