3.1.3 • Published 4 months ago

@axway/amplify-request v3.1.3

Weekly downloads
172
License
Apache-2.0
Repository
github
Last release
4 months ago

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);

Legal

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.

3.1.3

4 months ago

3.1.2

6 months ago

3.1.1

6 months ago

3.0.10

2 years ago

3.0.9

2 years ago

3.0.8

2 years ago

3.0.4

2 years ago

3.0.7

2 years ago

3.0.6

2 years ago

3.0.5

2 years ago

3.0.3-rc1

2 years ago

3.0.3

2 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

3.0.0-rc1

3 years ago

3.0.0-beta5

3 years ago

3.0.0-beta3

3 years ago

3.0.0-beta1

3 years ago

2.1.2

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.4.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago