@axway/requester
Module for HTTP requests
Last updated 2 months ago by bladedancer .
SEE LICENCE IN LICENSE · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @axway/requester 
SYNC missed versions from official npm registry.

axway-requester

Wrapper around request to provide unified approach of using it across other packages.

Configuration

This module export a wrapper function around request with the following parameters:

  • uri - the request location
  • headers - the request headers
  • method - the HTTP method
  • body - the request body
  • options - the options to configure the request

Supported Options

Some of the options are based on the request library options specified here - https://github.com/request/request#requestoptions-callback The default values used are:

const requestOptions = {
	followRedirect: true,
	followAllRedirects: true,
	followOriginalHttpMethod: true,
	strictSSL: true,
	maxRedirects: 10,
	gzip: true,
	encoding: null
};

Additional options could be provided as well:

  • rawBuffer - if true the requester returns raw Buffer, if false it does "smart" decoding.

Author

Axway R&D support@axway.com https://axway.com

Changes

4.0.4

  • #6187: Fix README.md input parameter documentation.

4.0.3

  • #6116: Internal cleanup chore.

4.0.2

  • #6114: Refactor code for style, security and performance improvements.

4.0.1

  • #6074: Internal CI chore

4.0.0

  • #5764: Add support for request and response logging using optional logger provided in options.
  • #5764: Breaking change: Removed error property from the response which was always going to be undefined.

3.2.4

  • #5711: Internal cleanup of npm scripts.

3.2.3

  • #5708: Internal changes to update mocha configuration

3.2.2

  • #5707: Internal cleanup to code coverage during build process.

3.2.1

  • #5622: Fix regression introduced in 3.1.1 where the format of the data returned would change depending on the value of the response rather than just the content-type header. Now, when content type is "application/json" and rawBuffer is false, a JSON value will be returned, otherwise it will throw an error while parsing. For other known text-like content-types including "application/xml", a valid string will always be returned. For every other case, a Buffer will be consistently returned.

3.2.0

  • #5630: Support outbound requests with object body as form data including files and streams when using multipart/form-data content type.
  • #5630: Add additional validation to individual payload fields to provide better error messages when using application/x-www-form-urlencoded content type.

3.1.1

  • #5622: Fixed error when the Accept header was a derivative of "application/json" and 0 length response body was returned.

3.1.0

  • #5329: Support outbound requests with object body as form data when using application/x-www-form-urlencoded content type.

3.0.0

  • #5432: Previously, the requester was encoding and decoding the payload assuming it was of type application/json. Now, it respects the provided content type.

2.1.0

  • #5364: Support insecure SSL option on outbound requests insecureSSL.

2.0.0

  • #4919: Requester now is just a tiny wrapper around the request module. It has no business logic within it.

  • #4918: Breaking change: Previously, if a request to a method which documented an optional query parameter with a default value and was not supplied to the request, the default value would be sent to the service instead. Now, default values are not used when sending query parameters.

  • #4918: Breaking change: Removed support for the following credential configuration values. Authorization parameters should be provided in authorizationData instead:

    • x-vendor-openapi-username
    • x-vendor-openapi-password
    • x-vendor-openapi-key
    • x-vendor-openapi-token
  • #4918: Added support for authorization parameters, replacing x-vendor-openapi- global configuration. These parameters are generated based on the security parameter in the original swagger document.

1.1.2

  • #4757: Changed SCM repository and associated internal cleanup.

License

This code is proprietary, closed source software licensed to you by Axway. All Rights Reserved. You may not modify Axway’s code without express written permission of Axway. You are licensed to use and distribute your services developed with the use of this software and dependencies, including distributing reasonable and appropriate portions of the Axway code and dependencies. Except as set forth above, this code MUST not be copied or otherwise redistributed without express written permission of Axway. This module is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement (General Conditions) located here: https://support.axway.com/en/auth/general-conditions; EXCEPT THAT IF YOU RECEIVED A FREE SUBSCRIPTION, LICENSE, OR SUPPORT SUBSCRIPTION FOR THIS CODE, NOTWITHSTANDING THE LANGUAGE OF THE GENERAL CONDITIONS, AXWAY HEREBY DISCLAIMS ALL SUPPORT AND MAINTENANCE OBLIGATIONS, AS WELL AS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO IMPLIED INFRINGEMENT WARRANTIES, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND YOU ACCEPT THE PRODUCT AS-IS AND WITH ALL FAULTS, SOLELY AT YOUR OWN RISK. Your right to use this software is strictly limited to the term (if any) of the license or subscription originally granted to you.

Current Tags

  • 4.0.5                                ...           latest (2 months ago)
  • 4.0.5                                ...           next (2 months ago)
  • 2.0.0-rdpp-feat-4918.d87e6a.0                                ...           rdpp-feat-4918 (2 years ago)
  • 2.0.0-rdpp-feat-5162.b48298.0                                ...           rdpp-feat-5162 (2 years ago)
  • 2.0.0-rdpp-feat-5235.b37758.0                                ...           rdpp-feat-5235 (2 years ago)
  • 2.0.0-swagger-v2-preview.7862b0.0                                ...           swagger-v2-preview (2 years ago)
  • 1.0.1-1                                ...           v4-preview3 (2 years ago)

58 Versions

  • 4.0.5                                ...           2 months ago
  • 4.0.4                                ...           2 months ago
  • 4.0.4-rdpp-6269.fcdbdf.0                                ...           2 months ago
  • 4.0.4-rdpp-6228.8dbc60.0                                ...           3 months ago
  • 4.0.4-rdpp-6187.528e39.0                                ...           3 months ago
  • 4.0.3                                ...           6 months ago
  • 4.0.2                                ...           6 months ago
  • 4.0.1                                ...           8 months ago
  • 2.0.0-swagger-v2-preview.7862b0.0                                ...           2 years ago
  • 2.0.0-swagger-v2-preview.b8c6ff.0                                ...           2 years ago
  • 2.0.0-swagger-v2-preview.09c711.0                                ...           2 years ago
  • 2.0.0-swagger-v2-preview.d782ae.0                                ...           2 years ago
  • 2.0.0-swagger-v2-preview.927944.0                                ...           2 years ago
  • 2.0.0-swagger-v2-preview.44b0ee.0                                ...           2 years ago
  • 2.0.0-swagger-v2-preview.5f3d96.0                                ...           2 years ago
  • 4.0.0                                ...           a year ago
  • 3.2.4                                ...           a year ago
  • 3.2.3                                ...           a year ago
  • 3.2.2                                ...           a year ago
  • 3.2.1                                ...           a year ago
  • 3.2.0                                ...           a year ago
  • 3.1.1                                ...           a year ago
  • 3.1.0                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.1.2                                ...           a year ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 2.0.0-rdpp-feat-4918.d87e6a.0                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.38ef09.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.629929.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.50304a.0                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.6bd6b7.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-5162.b48298.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.2d5162.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-5235.b37758.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-5235.29dff2.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.8bfb82.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-5162.960006.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-5235.4f6541.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.c3db6f.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.a5e408.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.804579.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.416e64.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.083e37.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.adf516.0                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.0c3b98.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.76d99a.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.bcf75e.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.5ff06a.0                                ...           2 years ago
  • 2.0.0-rdpp-feat-4918.59fced.0                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.1-1                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 65
Last Day 0
Last Week 58
Last Month 181
Dependencies (4)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |