Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@axway/amplify-request

Package Overview
Dependencies
Maintainers
19
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axway/amplify-request

HTTP request library for Axway CLI packages

  • 3.0.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.6K
increased by19.73%
Maintainers
19
Weekly downloads
 
Created
Source

Amplify Request

HTTP/HTTPS request library that wraps got and wires up proxy support.

Installation

npm install @axway/amplify-request

Usage

Create a got instance:

import * as request from '@axway/amplify-request';

const got = request.init({
	ca: '/path/to/ca-bundle.pem',
	proxy: 'https://localhost:3129',
	strictSSL: false
	// ... other got options
});

const { body } = await got('https://www.axway.com', { retry: 0 });

Create got options object:

import * as request from '@axway/amplify-request';

const opts = request.options({
	ca: '/path/to/ca-bundle.pem',
	defaults: {
		// `defaults` is a helper for declaring values loaded from a config file
		caFile: '/path/to/ca-bundle.pem',
		certFile: '/path/to/cert.crt',
		keyFile: '/path/to/private.key',
		proxy: 'https://localhost:3129',
		strictSSL: true
	},
	proxy: 'https://localhost:3129',
	strictSSL: false
	// ... other got options
});

Get a regular got instance:

Note that got does not support the ca, cert, defaults, key, proxy, or strictSSL properties. Those are specific to request.options() and request.init().

import * as request from '@axway/amplify-request';

let response = await request.got('https://www.axway.com/', { retry: 0 });

// or pass in a generated options object

const opts = request.options({
	proxy: 'https://localhost:3129'
});
response = await request.got('https://www.axway.com/', opts);

This project is open source under the Apache Public License v2 and is developed by Axway, Inc and the community. Please read the LICENSE file included in this distribution for more information.

Keywords

FAQs

Package last updated on 30 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc