How to use the @vtex/api.HttpClient.forExternal function in @vtex/api

To help you get started, we’ve selected a few @vtex/api 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 vtex-apps / store-graphql / node / dataSources / payments.ts View on Github external
const forProfile: HttpClientFactory = ({context, options}) => context &&
  HttpClient.forExternal(`http://${context.account}.vtexcommercestable.com.br/api/profile-system/pvt/profiles`, context, {...options, headers: {
    'Proxy-Authorization': context.authToken,
    'VtexIdClientAutCookie': context.authToken,
    'X-Vtex-Proxy-To': `http://${context.account}.vtexcommercestable.com.br`,
  }, metrics})